62,628
社区成员
发帖
与我相关
我的任务
分享import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
public class Test extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jPane = null;
private JPanel jP = null;
private JPanel jPB = null;
private JLabel jLbl1 = null;
private JLabel jLbl2 = null;
private JLabel jLbl3 = null;
private JLabel jLbl4 = null;
private JLabel jLbl5 = null;
private JLabel jLbl6 = null;
private JLabel jLbl7 = null;
private JLabel jLbl8 = null;
private JButton jBtn1 = null;
private JButton jBtn2 = null;
private JButton jBtn3 = null;
private JButton jBtn4 = null;
private JComboBox jComboBox = null;
private JTextField jTF1 = null;
private JTextField jTF2 = null;
private JTextField jTF3 = null;
private JTextField jTF4 = null;
private JTextField jTF5 = null;
private JTextField jTF6 = null;
private JTextField jTF7 = null;
public Test() {
super();
initialize();
}
private void initialize() {
jLbl1 = new JLabel("PUBLISHERS INFOMATION");
jLbl2 = new JLabel("Publishers ID:");
jLbl3 = new JLabel("Publishers Name:");
jLbl4 = new JLabel("Phone Number:");
jLbl5 = new JLabel("Address:");
jLbl6 = new JLabel("City:");
jLbl7 = new JLabel("State:");
jLbl8 = new JLabel("Zip:");
jTF1 = new JTextField(20);
jTF2 = new JTextField(20);
jTF3 = new JTextField(20);
jTF4 = new JTextField(20);
jTF5 = new JTextField(20);
jTF6 = new JTextField(20);
jTF7 = new JTextField(20);
jComboBox = new JComboBox();
jComboBox.addItem(new String("20001"));
jP = new JPanel();
jP.setLayout(new GridLayout(7, 3, 5, 5));
jP.add(jLbl2);
jP.add(jComboBox);
jP.add(jTF1);
jP.add(jLbl3);
jP.add(new JLabel(""));
jP.add(jTF2);
jP.add(jLbl4);
jP.add(new JLabel(""));
jP.add(jTF3);
jP.add(jLbl5);
jP.add(new JLabel(""));
jP.add(jTF4);
jP.add(jLbl6);
jP.add(new JLabel(""));
jP.add(jTF5);
jP.add(jLbl7);
jP.add(new JLabel(""));
jP.add(jTF6);
jP.add(jLbl8);
jP.add(new JLabel(""));
jP.add(jTF7);
jBtn1 = new JButton("Insert");
jBtn2 = new JButton("Update");
jBtn3 = new JButton("Clear");
jBtn4 = new JButton("Exit");
jPB = new JPanel();
jPB.add(jBtn1);
jPB.add(jBtn2);
jPB.add(jBtn3);
jPB.add(jBtn4);
jPane = new JPanel();
jPane.setBorder(new EmptyBorder(50, 50, 50, 50));
jPane.setLayout(new BorderLayout());
jPane.add(jP);
jPane.add(jPB, BorderLayout.SOUTH);
this.add(jPane);
this.setTitle("PUBLISHERS");
this.setSize(200, 100);
this.pack();
this.setVisible(true);
}
public static void main(String[] args){
Test t = new Test();
}
}import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
public class Test extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jPane = null;
private JPanel jP = null;
private JPanel jPB = null;
private JLabel jLbl1 = null;
private JLabel jLbl2 = null;
private JLabel jLbl3 = null;
private JLabel jLbl4 = null;
private JLabel jLbl5 = null;
private JLabel jLbl6 = null;
private JLabel jLbl7 = null;
private JLabel jLbl8 = null;
private JButton jBtn1 = null;
private JButton jBtn2 = null;
private JButton jBtn3 = null;
private JButton jBtn4 = null;
private JComboBox jComboBox = null;
private JTextField jTF1 = null;
private JTextField jTF2 = null;
private JTextField jTF3 = null;
private JTextField jTF4 = null;
private JTextField jTF5 = null;
private JTextField jTF6 = null;
private JTextField jTF7 = null;
public Test() {
super();
initialize();
}
private void initialize() {
jLbl1 = new JLabel("PUBLISHERS INFOMATION");
jLbl2 = new JLabel("Publishers ID:");
jLbl3 = new JLabel("Publishers Name:");
jLbl4 = new JLabel("Phone Number:");
jLbl5 = new JLabel("Address:");
jLbl6 = new JLabel("City:");
jLbl7 = new JLabel("State:");
jLbl8 = new JLabel("Zip:");
jTF1 = new JTextField(20);
jTF2 = new JTextField(20);
jTF3 = new JTextField(20);
jTF4 = new JTextField(20);
jTF5 = new JTextField(20);
jTF6 = new JTextField(20);
jTF7 = new JTextField(20);
jComboBox = new JComboBox();
jComboBox.addItem(new String("20001"));
jP = new JPanel();
jP.setLayout(new GridLayout(7, 3, 5, 5));
jP.add(jLbl2);
jP.add(jComboBox);
jP.add(jTF1);
jP.add(jLbl3);
jP.add(new JLabel(""));
jP.add(jTF2);
jP.add(jLbl4);
jP.add(new JLabel(""));
jP.add(jTF3);
jP.add(jLbl5);
jP.add(new JLabel(""));
jP.add(jTF4);
jP.add(jLbl6);
jP.add(new JLabel(""));
jP.add(jTF5);
jP.add(jLbl7);
jP.add(new JLabel(""));
jP.add(jTF6);
jP.add(jLbl8);
jP.add(new JLabel(""));
jP.add(jTF7);
jBtn1 = new JButton("Insert");
jBtn2 = new JButton("Update");
jBtn3 = new JButton("Clear");
jBtn4 = new JButton("Exit");
jPB = new JPanel();
jPB.add(jBtn1);
jPB.add(jBtn2);
jPB.add(jBtn3);
jPB.add(jBtn4);
jPane = new JPanel();
jPane.setBorder(new EmptyBorder(50, 50, 50, 50));
jPane.setLayout(new BorderLayout());
jPane.add(jP);
jPane.add(jPB, BorderLayout.SOUTH);
this.add(jPane);
this.setTitle("PUBLISHERS");
this.setSize(200, 100);
this.pack();
this.setVisible(true);
}
public static void main(String[] args){
Test t = new Test();
}
}import javax.swing.JPanel;
import javax.swing.JFrame;
import java.awt.BorderLayout;
import java.awt.GridLayout;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
public class Test extends JFrame {
private static final long serialVersionUID = 1L;
private JPanel jPane = null;
private JPanel jP = null;
private JPanel jPB = null;
private JLabel jLbl1 = null;
private JLabel jLbl2 = null;
private JLabel jLbl3 = null;
private JLabel jLbl4 = null;
private JLabel jLbl5 = null;
private JLabel jLbl6 = null;
private JLabel jLbl7 = null;
private JLabel jLbl8 = null;
private JButton jBtn1 = null;
private JButton jBtn2 = null;
private JButton jBtn3 = null;
private JButton jBtn4 = null;
private JComboBox jComboBox = null;
private JTextField jTF1 = null;
private JTextField jTF2 = null;
private JTextField jTF3 = null;
private JTextField jTF4 = null;
private JTextField jTF5 = null;
private JTextField jTF6 = null;
private JTextField jTF7 = null;
public Test() {
super();
initialize();
}
private void initialize() {
jLbl1 = new JLabel("PUBLISHERS INFOMATION");
jLbl2 = new JLabel("Publishers ID:");
jLbl3 = new JLabel("Publishers Name:");
jLbl4 = new JLabel("Phone Number:");
jLbl5 = new JLabel("Address:");
jLbl6 = new JLabel("City:");
jLbl7 = new JLabel("State:");
jLbl8 = new JLabel("Zip:");
jTF1 = new JTextField(20);
jTF2 = new JTextField(20);
jTF3 = new JTextField(20);
jTF4 = new JTextField(20);
jTF5 = new JTextField(20);
jTF6 = new JTextField(20);
jTF7 = new JTextField(20);
jComboBox = new JComboBox();
jComboBox.addItem(new String("20001"));
jP = new JPanel();
jP.setLayout(new GridLayout(7, 3, 5, 5));
jP.add(jLbl2);
jP.add(jComboBox);
jP.add(jTF1);
jP.add(jLbl3);
jP.add(new JLabel(""));
jP.add(jTF2);
jP.add(jLbl4);
jP.add(new JLabel(""));
jP.add(jTF3);
jP.add(jLbl5);
jP.add(new JLabel(""));
jP.add(jTF4);
jP.add(jLbl6);
jP.add(new JLabel(""));
jP.add(jTF5);
jP.add(jLbl7);
jP.add(new JLabel(""));
jP.add(jTF6);
jP.add(jLbl8);
jP.add(new JLabel(""));
jP.add(jTF7);
jBtn1 = new JButton("Insert");
jBtn2 = new JButton("Update");
jBtn3 = new JButton("Clear");
jBtn4 = new JButton("Exit");
jPB = new JPanel();
jPB.add(jBtn1);
jPB.add(jBtn2);
jPB.add(jBtn3);
jPB.add(jBtn4);
jPane = new JPanel();
jPane.setBorder(new EmptyBorder(50, 50, 50, 50));
jPane.setLayout(new BorderLayout());
jPane.add(jP);
jPane.add(jPB, BorderLayout.SOUTH);
this.add(jPane);
this.setTitle("PUBLISHERS");
this.setSize(200, 100);
this.pack();
this.setVisible(true);
}
public static void main(String[] args){
Test t = new Test();
}
}