+ 1
Write a java code that prompts the user to enter two integer values successively into an InputDialog box.
2 Answers
+ 2
static int[] query(){
int[] i = new int[2];
JFrame f=new JFrame();
JTextField t=new JTextField();
JLabel l=newJLabel(); //may be a second label
JButton=new JButton;
t.setBounds(Bounds);
l.setBounds();
t, l .setSize(size);
l.setText(String);
i[0]=l.getInt();//for first text fields
i[1]=l2.getInt();
return i;
}
You can use some awt.swing readt made compoment instead of fields. Frame is for PC but look at other like JApplet or JPanel.
If i i made mistake - i'm newbie little...sorry.
0
thanks bro helpd me out