📄 tabzhandialog.java
字号:
/*次类是负责站点增,删,改的界面规划*/
package pro;
import java.awt.*;
import java.awt.Event;
import javax.swing.*;
import javax.swing.table.*;
import java.util.*;
public class TabZhanDialog extends JDialog implements java.awt.event.ActionListener//,MouseListener
{
//new出所需组键
private DefaultTableModel mDtm;
private JTable tabShow=new JTable();
JLabel lblTitle = new JLabel();
JScrollPane Spn = new JScrollPane();
private JPanel pnlSouth=new JPanel();
private Selebus sel = new Selebus();
//private MainFrame mf;
private PnlCha pnl;
// private VoSumBus voSumBus;
JButton btnClose = new JButton();
public TabZhanDialog(BtnCenter bc,DefaultTableModel dtm)
{
super(bc,true);
mDtm=dtm;
/*为组键定位*/
//this.getContentPane().setLayout(null);
this.getContentPane().setLayout(new BorderLayout());
lblTitle.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 18));
lblTitle.setForeground(new Color(0, 210, 46));
lblTitle.setHorizontalAlignment(SwingConstants.CENTER);
lblTitle.setText("站点查询结果");
lblTitle.setBounds(new Rectangle(86, 7, 286, 33));
Spn.setBounds(new Rectangle(15, 36, 500,450));
tabShow.setColumnSelectionAllowed(true);
tabShow.setBounds(20,40,480,430);
Spn.getViewport().add(tabShow);
this.add(lblTitle,BorderLayout.NORTH);
this.add(Spn);
btnClose.setBounds(new Rectangle(192, 440, 114, 31));
btnClose.setFont(new java.awt.Font("Dialog", Font.BOLD | Font.ITALIC, 18));
btnClose.setForeground(new Color(0, 210, 46));
btnClose.setToolTipText("");
btnClose.setText("退出");
pnlSouth.add(btnClose);
this.add(pnlSouth,BorderLayout.SOUTH);
this.tabShow.setModel(mDtm);
btnClose.setActionCommand("btnClose");
// this.tabShow.setAction
btnClose.addActionListener(this);
setSize(new Dimension(550,520));
setTitle("长沙公交查询管理系统");
}
public void actionPerformed(java.awt.event.ActionEvent ae)
{
this.dispose();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -