I want to call a variable in another application
Greetings,
I asked previously a similar question but I didn't got a solution to my problem, so i'll explain in details my problem:
I have a Java File called Senior.java, and another one called Properties.java
Properties.java is a dialog box that I can open from the main application Senior.java using Tools > Properties command.
Now, in Properties I have Radio buttons, and In Senior I have a JButton that upon clicking should run a process depending on what I choose in the properties dialog box.
One solution I thought about is to retun a number for every Radio Button and store this number in an integer variable "action".
Now I want from Senior to know the value of action.
Some code from properties.java:
[code]:
public class Properties extends JFrame
{...............
private int action;
public Properties()
{ // Creating the Radio Buttons and set visible ............................
}
public static void main( String args[] )
{
Properties application = new Properties();
application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
}
private class RadioButtonHandler implements ItemListener
{
public void itemStateChanged( ItemEvent event )
{
if (event.getSource()==adfButton)
action = 1;
else if ( event.getSource()== normalButton )
action = 2;
else if ( event.getSource()== hiddenButton )
action = 3;
}
}
/*public int getAction()
{
return action;
}
*/
Any Suggesstions
Thanks in Advanced
M.Tleis

