[SOLVED] new2java- gettext settext
Code i wrote for ClickPlay is to get the first hand money input into the textfield by using InputDialog, i try to put it in the ClickPlay(), when i click start, it keeps poping up the dialog box, and not reading the number to the textfield, is something wrong with the code or i need to put it to somewhere else(which i tried to put it to different places) please help
Code:
CASHONHAND = JOptionPane.showInputDialog("Enter The Amount You Wish To Play");
cashonhand = Double.parseDouble(CashOnHandNum.getText());
CashOnHandNum.setText("" + cashonhand);
Code:
private class ClickPlay implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
CASHONHAND = JOptionPane.showInputDialog("Enter The Amount You Wish To Play");
cashonhand = Double.parseDouble(CashOnHandNum.getText());
CashOnHandNum.setText("" + cashonhand);
ActionListener Begin = new TimeStamp();
MyTimer = new Timer(35, Begin);
MyTimer.start();
}
private class TimeStamp implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
Action++;
if (Action < 20)
{
HideOne = RandomNumbers();
HideTwo = RandomNumbers();
HideTre = RandomNumbers();
NumberOne.setText("" + HideOne);
NumberTwo.setText("" + HideTwo);
NumberTre.setText("" + HideTre);
}
else
{
Action = 0;
MyTimer.stop();
NumberOne.setText("*");
NumberTwo.setText("*");
NumberTre.setText("*");
}
}
}
}
Code:
JTextField CashOnHandNum = new JTextField();
String CASHONHAND;
jScroolPane in JInternalFrame
Hey everybody,
- I make menu form(JForm) to access another form (this form use max resolution screen which computer run)
- From menu form, I load another form(JInternalFrame) into this form.
- another form have jScroolPane in JInternalFrame.
Process:
- When I run my program, scrool in another form can not functioned.
My question:
- How I must do for activating this scrool?
- I can use scrool with JDialog, but I can not using screen resolution for making display area. How I set display area JDialog?
Thank's a lot for your time.
Salam,
bagianto