Oracle9i查询器.用jdbc实现().用了swing..(面板一)

来源:互联网 发布:哈萨克软件qorjin 编辑:程序博客网 时间:2024/05/05 14:45

package client;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

 
public class InputInterface extends JPanel{
 private JTextArea commondarea;
 private JTextField commondfield;
 private JButton okbutton;
 
 public JTextArea getCommondarea() {
  return commondarea;
 }

 public JTextField getCommondfield() {
  return commondfield;
 }

 public JButton getOkbutton() {
  return okbutton;
 }

 public InputInterface(){
  this.setLayout(new BorderLayout());
  this.setSize(500,500);
  commondarea= new JTextArea();
  commondfield=new JTextField(20);
  okbutton =new JButton("发送");
  
  commondarea.setEditable(false);  //设为不可修改
  JScrollPane jsp=new JScrollPane(commondarea);
  this.add(jsp);
  
  JPanel p=new JPanel();
  p.add(commondfield);
  p.add(okbutton);
  
  this.add(p,"South");
 }

原创粉丝点击