frame1.java~11~
来自「JBUILDER9源代码下载,用JBUILDER轻松战胜JAVA编程」· JAVA~11~ 代码 · 共 47 行
JAVA~11~
47 行
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 { JPanel contentPane; BorderLayout borderLayout1 = new BorderLayout(); Database database1 = new Database(); TableScrollPane tableScrollPane1 = new TableScrollPane(); JdbTable jdbTable1 = new JdbTable(); QueryDataSet queryDataSet1 = new QueryDataSet(); //构造Frame public Frame1() { enableEvents(AWTEvent.WINDOW_EVENT_MASK); try { jbInit(); } catch(Exception e) { e.printStackTrace(); } } //初始化组件 private void jbInit() throws Exception { contentPane = (JPanel) this.getContentPane(); database1.setConnection(new com.borland.dx.sql.dataset.ConnectionDescriptor("jdbc:oracle:thin:@192.168.2.6:1521:data", "scott", "tiger", false, "oracle.jdbc.driver.OracleDriver")); contentPane.setLayout(borderLayout1); this.setSize(new Dimension(400, 300)); this.setTitle("Frame Title"); queryDataSet1.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database1, "SELECT FLOW.FLOW_ID,FLOW.NAME,FLOW.TYPE,FLOW.DESCRIPTION,FLOW.RESOURCES_ID,FLOW.TRANSFER_ID,FLOW.PARE" + "NT_PROCESS_ID,FLOW.PROJECT_ID FROM SCOTT.FLOW", null, true, Load.ALL)); contentPane.add(tableScrollPane1, BorderLayout.CENTER); tableScrollPane1.getViewport().add(jdbTable1, 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 + =
减小字号Ctrl + -
显示快捷键?