-
opening a JDialog
hey i have a button on a main frame and i want to open a JDialog. The main frame views information which is stored in a file and the JDialog is a form to add new information. Thanks.
-
'this' refers to the frame owner, the string is the title, the boolean value is for modal. if true, the parent frame cannot be accessed until the dialog has been closed.
JDialog d = new JDialog(this, "title", true);
d.show();
-
I have worked that out all ready. I have a class called viewer and i want to open a class which implements JDialog and its called InputInfo and i want to open it through a butten in viewer
-
er.. is JDialog an interface? i didnt think so.. given that it's not an interface, how did you "implements" it?
-
sorry InputInfo extends JDialog and i wont to open it from a button in viewInfo.
-
so are you asking how to show a jdialog, or how to perform an action from a button click?
-
I want to know how to open a JDialog
JDialog n = new JDialog(); opens a empty dialog i want to open a dialog which i have already created.
-
myJDialog.show()?
myJDialog.setVisible(true)?
-
It only opens a plain dialog i want to open a dialog ive already created
-
oh my, this is going to be a long thread.
call the show() method from YOUR dialog. If it's still blank, then you've created your dialog wrong. Did you remember to add components to it?
-
I have created
public void show()
{
InputInfo info = new InputInfo();
}
but it cannot overrite JDialog show if i put throws IOException but it throws IOException if i can put it here where else can i put it?
This was my problem in viewer as it throws an IOException when i did the same line of code but im overriting a button there.
-
why are you trying to overwrite show()?
If InputInfo is your dialog class, then you do info.show()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks