import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
public class q3 extends JFrame implements ActionListener {
private JTextField t,t1,t2,t3; //declaration
private JButton b1,b2,b3,b4;
private JPanel framepanel, textpanel, buttonpanel;
q3() {
framepanel = new JPanel();
framepanel.setLayout(new GridLayout(2,1,7,7));
setSize(550,400);
textpanel = new JPanel();
textpanel.setLayout(new GridLayout(4,2,7,10));
setSize(550,400);
setVisible(true);
// setLayout(new GridLayout(5,3,0,0));
t= new JTextField();
t.setColumns(50);
t1 = new JTextField();
t1.setColumns(15);
t2 = new JTextField();
t2.setColumns(15);
t3 = new JTextField();
t3.setColumns(15);
textpanel.add(new Label("Name: "));
textpanel.add(t);
textpanel.add(new Label("Gender: M/F "));
textpanel.add(t1);
textpanel.add(new Label("Birth date dd/mm/yy: "));
textpanel.add(t2);
textpanel.add(new Label("Test date dd/mm/yy: "));
textpanel.add(t3);
framepanel.add(textpanel, BorderLayout.WEST);
buttonpanel = new JPanel();
buttonpanel.setLayout(new FlowLayout());
setVisible(true);
b1 = new JButton("BACK");
b1.addActionListener(this);
b2 = new JButton("NEXT");
b2.addActionListener(this);
buttonpanel.add(b1);
buttonpanel.add(b2);
framepanel.add(buttonpanel, BorderLayout.SOUTH);
add(framepanel);
}
public void actionPerformed(ActionEvent f) {
if (f.getSource()== b1) {
new EngScreen();
this.dispose();
}
else
if (f.getSource()== b2) {
//new q3();
// this.dispose();
}
}
public static void main(String args[]){
q3 myevent = new q3();
myevent.setTitle("Information");
myevent.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
myevent.setVisible(true);
}
}
about my java gui link to mysql problemabout my java gui link to mysql problem
Page 1 of 1
1 Replies - 451 Views - Last Post: 27 September 2010 - 09:55 AM
#1 Guest_oscarhue*
about my java gui link to mysql problem
Posted 27 September 2010 - 09:51 AM
hi everyone, can anyone help me, i'm new here and i'm just studying java not more than 3 month. now I got a problem about my code because I didn't know how to connect to mysql, can you guys help me and can share some code for me ?
Replies To: about my java gui link to mysql problem
#2
Re: about my java gui link to mysql problem
Posted 27 September 2010 - 09:55 AM
Duplicate topic closed. I posted a link to a tutorial in your other thread.
Page 1 of 1
|
|

New Topic/Question
This topic is locked
MultiQuote









|