+ 1

Write a java code that prompts the user to enter two integer values successively into an InputDialog box.

3rd Mar 2017, 7:47 AM
yandisa
2 Respostas
+ 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.
5th Mar 2017, 9:43 AM
Michał Bujakowski
Michał Bujakowski - avatar
0
thanks bro helpd me out
6th Mar 2017, 6:50 AM
yandisa