Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

How to create a generic popup window class.

Hi all,

I have a Main class called called MainWindow.java i want to create a inheritence class called PopUpWindow.java.This class should be responsible for firing off a small window in the MainWindow for any three conditions.

These conditions are to be in three classes which are inherited from PoPUpWindow.java, they are

ErrorWindow.java- this class should fire off an error message with a simple OK button to ackknowledge

InfoWindow.java - just a simple message with a OK to acknowledge.

EnterText.java - this is a popup which comes up where the user enters text and pressing OK adds it to a menu for example.

I would appreciate detailed answers from the experts on how to create these classes with code, or pointers to web pages which are specific to what i want. I will initially put this up for 100 points.

thanks in advance

flix
0
flix
Asked:
flix
1 Solution
 
dbaoraCommented:
Hi,
you can user the JOptionPanel instead.
It has showMessageDialog() function, shich shows a message dialog, showConfirmDialog funcion and other nice stuff.
You can create your own panel and use it in the JOptionPane Dialog, thus extending its capabilites without having to implement all from the begining.

regards,
dbaora.
0
 
sudhakar_koundinyaCommented:


No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:


--  points to dbaora


Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
sudhakar_koundinya
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post your concern in THIS thread.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now