📄 frame1.java~19~
字号:
package untitled1;import java.awt.*;import java.awt.event.*;import javax.swing.*;import com.borland.dx.sql.dataset.*;import com.borland.dbswing.*;import java.util.*;public class Frame1 extends JFrame { ResourceBundle sqlRes = ResourceBundle.getBundle("untitled1.SqlRes"); JPanel contentPane; BorderLayout borderLayout1 = new BorderLayout(); Database database1 = new Database(); QueryDataSet queryDataSet1 = new QueryDataSet(); TableScrollPane tableScrollPane1 = new TableScrollPane(); JdbTable jdbTable1 = new JdbTable(); JdbNavField jdbNavField1 = new JdbNavField(); JdbNavToolBar jdbNavToolBar1 = new JdbNavToolBar(); JLabel jLabel1 = new JLabel(); DBDisposeMonitor dBDisposeMonitor1 = new DBDisposeMonitor(); //Construct the frame public Frame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //Component initialization private void jbInit() throws Exception { contentPane = (JPanel) this.getContentPane(); queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, sqlRes.getString("SCOTT.FLOW"), null, true, Load.ALL)); database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:oracle:thin:@localhost:1521:han", "scott", "tiger", false, "oracle.jdbc.driver.OracleDriver")); contentPane.setLayout(borderLayout1); this.setSize(new Dimension(400, 300)); this.setTitle("Frame Title"); jdbTable1.setDataSet(queryDataSet1); jdbNavField1.setPreferredSize(new Dimension(125, 20)); jdbNavField1.setText("jdbNavField1"); jLabel1.setText("Find"); dBDisposeMonitor1.setDataAwareComponentContainer(this); contentPane.add(tableScrollPane1, BorderLayout.CENTER); tableScrollPane1.getViewport().add(jdbTable1, null); contentPane.add(jdbNavToolBar1, BorderLayout.NORTH); jdbNavToolBar1.add(jLabel1, null); jdbNavToolBar1.add(jdbNavField1, null); } //Overridden so we can exit when window is closed protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { System.exit(0); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -