java制作图形界面数据库_java图形界面以及链接数据库
import java、awt、*;
import java、awt、event、*;
import javax、swing、*;
import java、sql、*;
public class NoteTextArea extends JFrame implements ActionListener
{
private JPanel jp=new JPanel();
private JButton[] jb = new JButton[4];
private JComboBox box;
private JTextArea jt=new JTextArea();
private JScrollPane js=new JScrollPane(jt,ScrollPaneConstants、VERTICAL_SCROLLBAR_ALWAYS,ScrollPaneConstants、HORIZONTAL_SCROLLBAR_NEVER);
private String[] obj;
private JTextField text = new JTextField();
public NoteTextArea()
{
jp、setLayout(null);
String[] obj = new String[]{"微笑","生氣","難過","得意"};
box = new JComboBox(obj);
JLabel j1 = new JLabel("留言版");
JLabel j2 = new JLabel("您");
JLabel j3 = new JLabel("地說:");
jb[0] = new JButton("清屏");
jb[1] = new JButton("至頂");
jb[2] = new JButton("至尾");
jb[3] = new JButton("提交");
for(int i = 0;i < 3;i++)
{
jb[i]、setBounds(650,i*75+55,100,50);
}
for(int i = 0;i < 3;i++)
{
jp、add(jb[i]);
}
j1、setBounds(280,10,50,30);
j2、setBounds(20,375,30,50);
box、setBounds(55,385,80,30);
j3、setBounds(160,375,40,50);
text、setBounds(210,385,300,30);
jb[3]、setBounds(520,365,75,50);
js、setBounds(10,50,600,300);
jp、add(j1);
jp、add(j2);
總結(jié)
以上是生活随笔為你收集整理的java制作图形界面数据库_java图形界面以及链接数据库的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python程序题斐波那契数列_Pyth
- 下一篇: mysql timdir_MYSQL学习