Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting the main.java to recognize data entry without closing the dialog.  RSS feed

 
madwagon O'Be
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use a jdialog I created that represents a keypad to enter data and send that data to the main program for processing upon selecting a button on the dialog. I need to keep the keypad displayed until the exit is selected, while allowing the main program to accept the keypad entries and process them. At this point I have to close the dialog to get the data to the main program. Any help is appreciated. I have a JFrame that instantiates the keypad jdialog and displays that jdialog. Thanks in advance!
 
Bernhard Goetz
Ranch Hand
Posts: 57
1
Java Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
can you post some code?

Regards,
Bernhard
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you imply you don't want the pseudo keypad modal you don't need a dialog; just a frame holding the buttons.
 
Randall Twede
Ranch Hand
Posts: 4585
6
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not sure where he is going with this, but this is similar.
my "main" class has a class that extends JPanel. i made this NOT private.
i have a dialog. i pass it a reference to the main class.
now it can access and manipulate the JPanel.
 
Randall Twede
Ranch Hand
Posts: 4585
6
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i misunderstood you. to get the data from the dialog to the main class you will need to write "setters" for the main class(call them from the dialog) and then pass the main class to the dialog in it's constructor.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!