Solved

How to create a generic popup window class.

Posted on 2001-06-21
2
338 Views
Last Modified: 2006-11-17
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
Comment
Question by:flix
2 Comments
 
LVL 2

Accepted Solution

by:
dbaora earned 100 total points
Comment Utility
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
 
LVL 14

Expert Comment

by:sudhakar_koundinya
Comment Utility


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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This video teaches viewers about errors in exception handling.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now