List of usage examples for javax.swing JSplitPane LEFT
String LEFT
To view the source code for javax.swing JSplitPane LEFT.
Click Source Link
Component
to the left of the other Component
. From source file:junk.gui.HazardSpectrumApplication.java
private void jbInit() throws Exception { border1 = BorderFactory.createLineBorder(SystemColor.controlText, 1); border2 = BorderFactory.createLineBorder(SystemColor.controlText, 1); border3 = BorderFactory.createEmptyBorder(); border4 = BorderFactory.createLineBorder(SystemColor.controlText, 1); border5 = BorderFactory.createLineBorder(SystemColor.controlText, 1); border6 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white, new Color(98, 98, 112), new Color(140, 140, 161)); border7 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white, new Color(98, 98, 112), new Color(140, 140, 161)); border8 = BorderFactory.createBevelBorder(BevelBorder.RAISED, Color.white, Color.white, new Color(98, 98, 112), new Color(140, 140, 161)); //this.getContentPane().setBackground(Color.white); this.setSize(new Dimension(1100, 670)); this.getContentPane().setLayout(borderLayout1); jPanel1.setLayout(gridBagLayout10);//from www. j a v a 2 s . c o m //creating the Object the GraphPaenl class graphPanel = new GraphPanel(this); jPanel1.setBackground(Color.white); jPanel1.setBorder(border4); jPanel1.setMinimumSize(new Dimension(959, 600)); jPanel1.setPreferredSize(new Dimension(959, 600)); //loading the OpenSHA Logo topSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); clearButton.setText("Clear Plot"); clearButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { clearButton_actionPerformed(e); } }); imgLabel.setText(""); imgLabel.setIcon(new ImageIcon(FileUtils.loadImage(this.POWERED_BY_IMAGE))); imgLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(MouseEvent e) { imgLabel_mouseClicked(e); } }); //jCheckylog.setBackground(Color.white); //jCheckylog.setForeground(new Color(80, 80, 133)); //buttonPanel.setBackground(Color.white); buttonPanel.setMinimumSize(new Dimension(568, 20)); buttonPanel.setLayout(flowLayout1); //progressCheckBox.setBackground(Color.white); progressCheckBox.setFont(new java.awt.Font("Dialog", 1, 12)); //progressCheckBox.setForeground(new Color(80, 80, 133)); progressCheckBox.setSelected(true); progressCheckBox.setText("Show Progress Bar"); addButton.setText("Compute"); addButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { addButton_actionPerformed(e); } }); // jCheckxlog.setBackground(Color.white); //jCheckxlog.setForeground(new Color(80, 80, 133)); //controlComboBox.setBackground(new Color(200, 200, 230)); //controlComboBox.setForeground(new Color(80, 80, 133)); controlComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { controlComboBox_actionPerformed(e); } }); panel.setLayout(gridBagLayout9); panel.setBackground(Color.white); panel.setBorder(border5); panel.setMinimumSize(new Dimension(0, 0)); imrSplitPane.setOrientation(JSplitPane.VERTICAL_SPLIT); imrSplitPane.setBottomComponent(imtPanel); imrSplitPane.setTopComponent(imrPanel); erfSplitPane.setTopComponent(erfPanel); sitePanel.setLayout(gridBagLayout13); sitePanel.setBackground(Color.white); imtPanel.setLayout(gridBagLayout8); imtPanel.setBackground(Color.white); controlsSplit.setDividerSize(5); erfPanel.setLayout(gridBagLayout5); erfPanel.setBackground(Color.white); erfPanel.setBorder(border2); erfPanel.setMaximumSize(new Dimension(2147483647, 10000)); erfPanel.setMinimumSize(new Dimension(2, 300)); erfPanel.setPreferredSize(new Dimension(2, 300)); imrPanel.setLayout(gridBagLayout15); imrPanel.setBackground(Color.white); chartSplit.setLeftComponent(panel); chartSplit.setRightComponent(paramsTabbedPane); probDeterSelection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { probDeterSelection_actionPerformed(e); } }); peelOffButton.setText("Peel Off"); peelOffButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(ActionEvent e) { peelOffButton_actionPerformed(e); } }); this.getContentPane().add(jPanel1, BorderLayout.CENTER); jPanel1.add(topSplitPane, new GridBagConstraints(0, 0, 1, 1, 1.0, 1.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(11, 4, 5, 6), 243, 231)); buttonPanel.add(probDeterSelection, null); buttonPanel.add(controlComboBox, null); buttonPanel.add(addButton, null); buttonPanel.add(clearButton, null); buttonPanel.add(peelOffButton, null); buttonPanel.add(progressCheckBox, null); buttonPanel.add(imgLabel, null); topSplitPane.add(chartSplit, JSplitPane.TOP); chartSplit.add(panel, JSplitPane.LEFT); chartSplit.add(paramsTabbedPane, JSplitPane.RIGHT); imrSplitPane.add(imrPanel, JSplitPane.TOP); imrSplitPane.add(imtPanel, JSplitPane.BOTTOM); controlsSplit.add(imrSplitPane, JSplitPane.LEFT); paramsTabbedPane.add(controlsSplit, "IMR, IML/Prob, & Site"); controlsSplit.add(sitePanel, JSplitPane.RIGHT); paramsTabbedPane.add(erfSplitPane, "ERF & Time Span"); erfSplitPane.add(erfPanel, JSplitPane.LEFT); topSplitPane.add(buttonPanel, JSplitPane.BOTTOM); topSplitPane.setDividerLocation(600); imrSplitPane.setDividerLocation(300); erfSplitPane.setDividerLocation(260); controlsSplit.setDividerLocation(260); erfPanel.validate(); erfPanel.repaint(); chartSplit.setDividerLocation(600); }
From source file:com.peterbochs.PeterBochsDebugger.java
private JSplitPane getJSplitPane3() { if (jSplitPane3 == null) { jSplitPane3 = new JSplitPane(); jSplitPane3.setDividerLocation(400); {// ww w. j a v a 2 s.c o m jScrollPane7 = new JScrollPane(); jSplitPane3.add(jScrollPane7, JSplitPane.RIGHT); { jPageTableTable = new JTable(); jScrollPane7.setViewportView(jPageTableTable); jPageTableTable.setModel(new PageTableTableModel()); jPageTableTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); jPageTableTable.getColumnModel().getColumn(0).setPreferredWidth(40); for (int x = 2; x <= 11; x++) { jPageTableTable.getColumnModel().getColumn(x).setPreferredWidth(40); } jPageTableTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jPageTableTableMouseClicked(evt); } }); } } { jScrollPane8 = new JScrollPane(); jSplitPane3.add(jScrollPane8, JSplitPane.LEFT); { // TableModel jPageDirectoryTableModel = new // DefaultTableModel(new String[][] {}, new String[] { // "No.", "PT base", "AVL", "G", "D", "A", "PCD", "PWT", // "U/S", // "W/R", "P" }) { // public boolean isCellEditable(int row, int column) { // return false; // } // }; jPageDirectoryTable = new JTable(); jScrollPane8.setViewportView(jPageDirectoryTable); jPageDirectoryTable.setModel(new PageDirectoryTableModel()); jPageDirectoryTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); jPageDirectoryTable.getColumnModel().getColumn(0).setPreferredWidth(40); for (int x = 2; x < 11; x++) { jPageDirectoryTable.getColumnModel().getColumn(x).setPreferredWidth(40); } jPageDirectoryTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jPageDirectoryTableMouseClicked(evt); } }); } } } return jSplitPane3; }
From source file:com.peterbochs.PeterBochsDebugger.java
private JSplitPane getJSplitPane2() { jSplitPane2 = new JSplitPane(); jSplitPane2.setPreferredSize(new java.awt.Dimension(1009, 781)); jSplitPane2.setOrientation(JSplitPane.VERTICAL_SPLIT); {/*from w ww . jav a 2 s . c om*/ jSplitPane1 = new JSplitPane(); jSplitPane2.add(jSplitPane1, JSplitPane.TOP); jSplitPane1.setDividerLocation(400); { jTabbedPane1 = new JMaximizableTabbedPane(); jSplitPane1.add(jTabbedPane1, JSplitPane.RIGHT); jTabbedPane1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jTabbedPane1StateChanged(evt); } }); { jPanel10 = new JPanel(); BorderLayout jPanel10Layout = new BorderLayout(); jPanel10.setLayout(jPanel10Layout); jTabbedPane1.addTab(MyLanguage.getString("Instruction"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/text_padding_top.png")), jPanel10, null); jPanel10.setPreferredSize(new java.awt.Dimension(604, 452)); { jInstructionControlPanel = new JPanel(); jPanel10.add(jInstructionControlPanel, BorderLayout.NORTH); { ComboBoxModel jInstructionComboBoxModel = new DefaultComboBoxModel(new String[] {}); jInstructionComboBox = new JComboBox(); jInstructionControlPanel.add(jInstructionComboBox); jInstructionControlPanel.add(getDisassembleButton()); jInstructionComboBox.setModel(jInstructionComboBoxModel); jInstructionComboBox.setEditable(true); jInstructionComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jInstructionComboBoxActionPerformed(evt); } }); } { disassembleCurrentIPButton = new JButton(); jInstructionControlPanel.add(disassembleCurrentIPButton); jInstructionControlPanel.add(getJInstructionUpTenButton()); jInstructionControlPanel.add(getJInstructionUpButton()); jInstructionControlPanel.add(getJButton22()); jInstructionControlPanel.add(getJButton3()); jInstructionControlPanel.add(getJButton12()); disassembleCurrentIPButton.setText(MyLanguage.getString("Disassemble") + " cs:eip"); disassembleCurrentIPButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { disassembleCurrentIPButtonActionPerformed(evt); } }); } } { instructionTableScrollPane = new JScrollPane(); jPanel10.add(instructionTableScrollPane, BorderLayout.CENTER); { instructionTable = new JTable(); instructionTableScrollPane.setViewportView(instructionTable); instructionTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); instructionTable.setModel(new InstructionTableModel()); instructionTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); instructionTable.getTableHeader().setReorderingAllowed(false); instructionTable.getColumnModel().getColumn(0).setMaxWidth(20); instructionTable.getColumnModel().getColumn(1).setPreferredWidth(40); instructionTable.getColumnModel().getColumn(2).setPreferredWidth(200); instructionTable.getColumnModel().getColumn(3).setPreferredWidth(40); instructionTable.setDefaultRenderer(String.class, new InstructionTableCellRenderer()); instructionTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { instructionTableMouseClicked(evt); } }); } } } { jPanel4 = new JPanel(); jTabbedPane1 .addTab(MyLanguage.getString("Breakpoint"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/cancel.png")), jPanel4, null); BorderLayout jPanel4Layout = new BorderLayout(); jPanel4.setLayout(jPanel4Layout); { jScrollPane9 = new JScrollPane(); jPanel4.add(jScrollPane9, BorderLayout.CENTER); { breakpointTable = new JTable(); breakpointTable.getTableHeader().setReorderingAllowed(false); jScrollPane9.setViewportView(breakpointTable); breakpointTable.setModel(jBreakpointTableModel); breakpointTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); breakpointTable.getColumnModel().getColumn(0) .setCellRenderer(new BreakpointTableCellRenderer()); breakpointTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { breakpointTableMouseClicked(evt); } }); breakpointTable.getColumnModel().getColumn(2).setPreferredWidth(100); breakpointTable.getColumnModel().getColumn(3).setPreferredWidth(20); } } { jPanel12 = new JPanel(); jPanel4.add(jPanel12, BorderLayout.SOUTH); { jAddBreakpointButton = new JButton(); jPanel12.add(jAddBreakpointButton); jAddBreakpointButton.setText(MyLanguage.getString("Add")); jAddBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jAddBreakpointButtonActionPerformed(evt); } }); } { jDeleteBreakpointButton = new JButton(); jPanel12.add(jDeleteBreakpointButton); jDeleteBreakpointButton.setText(MyLanguage.getString("Del")); jDeleteBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jDeleteBreakpointButtonActionPerformed(evt); } }); } { jRefreshBreakpointButton = new JButton(); jPanel12.add(jRefreshBreakpointButton); jRefreshBreakpointButton.setText(MyLanguage.getString("Refresh")); jRefreshBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jRefreshBreakpointButtonActionPerformed(evt); } }); } { jEnableBreakpointButton = new JButton(); jPanel12.add(jEnableBreakpointButton); jEnableBreakpointButton.setText(MyLanguage.getString("Enable")); jEnableBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jEnableBreakpointButtonActionPerformed(evt); } }); } { jDisableBreakpointButton = new JButton(); jPanel12.add(jDisableBreakpointButton); jDisableBreakpointButton.setText(MyLanguage.getString("Disable")); jDisableBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jDisableBreakpointButtonActionPerformed(evt); } }); } { jSaveBreakpointButton = new JButton(); jPanel12.add(jSaveBreakpointButton); jSaveBreakpointButton.setText(MyLanguage.getString("Save")); jSaveBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jSaveBreakpointButtonActionPerformed(evt); } }); } { jLoadBreakpointButton = new JDropDownButton(); jPanel12.add(jLoadBreakpointButton); jPanel12.add(getJSBButton()); jPanel12.add(getJSBAButton()); jLoadBreakpointButton.setText(MyLanguage.getString("Load")); jLoadBreakpointButton.add(loadElfMenuItem); jLoadBreakpointButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jLoadBreakpointButtonActionPerformed(evt); } }); } } } { jPanel1 = new JPanel(); jTabbedPane1.addTab(MyLanguage.getString("Bochs"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/application_xp_terminal.png")), jPanel1, null); jTabbedPane1.addTab("ELF", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/linux.png")), getJELFBreakpointPanel(), null); DiskPanel diskPanel = getDiskPanel(); if (diskPanel.getFile() != null) { jTabbedPane1.addTab(diskPanel.getFile().getName(), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/package.png")), diskPanel, null); } BorderLayout jPanel1Layout = new BorderLayout(); jPanel1.setLayout(jPanel1Layout); { jScrollPane4 = new JScrollPane(); jPanel1.add(jScrollPane4, BorderLayout.CENTER); { bochsEditorPane = new JEditorPane(); jScrollPane4.setViewportView(bochsEditorPane); } } { jPanel2 = new JPanel(); TableLayout jPanel2Layout = new TableLayout(new double[][] { { TableLayout.FILL, 411.0, TableLayout.MINIMUM, TableLayout.MINIMUM }, { TableLayout.FILL } }); jPanel2Layout.setHGap(5); jPanel2Layout.setVGap(5); jPanel2.setLayout(jPanel2Layout); jPanel1.add(jPanel2, BorderLayout.SOUTH); { bochsCommandTextField = new JTextField(); jPanel2.add(bochsCommandTextField, "0, 0, 1, 0"); bochsCommandTextField.addKeyListener(new KeyAdapter() { public void keyPressed(KeyEvent evt) { jBochsCommandTextFieldKeyPressed(evt); } public void keyTyped(KeyEvent evt) { bochsCommandTextFieldKeyTyped(evt); } }); } { bochsCommandButton = new JButton(); jPanel2.add(bochsCommandButton, "2, 0"); jPanel2.add(getJClearBochsButton(), "3, 0"); bochsCommandButton.setText("Run"); bochsCommandButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { bochsCommandButtonActionPerformed(evt); } }); } } } } { jTabbedPane3 = new JMaximizableTabbedPane(); jSplitPane1.add(jTabbedPane3, JSplitPane.LEFT); { jPanel8 = new JPanel(); BorderLayout jPanel8Layout = new BorderLayout(); jPanel8.setLayout(jPanel8Layout); jTabbedPane3 .addTab(MyLanguage.getString("Memory"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/memory.png")), jPanel8, null); { jScrollPane2 = new JScrollPane(); jPanel8.add(jScrollPane2, BorderLayout.CENTER); { jHexTable1 = new HexTable(); jHexTable1.getColumnModel().getColumn(0).setPreferredWidth(30); for (int x = 1; x < 9; x++) { jHexTable1.getColumnModel().getColumn(x).setPreferredWidth(10); } jScrollPane2.setViewportView(jHexTable1); jHexTable1.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jHexTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); jHexTable1.setCellSelectionEnabled(true); jHexTable1.getTableHeader().setReorderingAllowed(false); jHexTable1.setDefaultRenderer(String.class, new MemoryTableCellRenderer()); jHexTable1.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jHexTable1MouseClicked(evt); } }); } } { jPanel9 = new JPanel(); FlowLayout jPanel9Layout = new FlowLayout(); jPanel9.setLayout(jPanel9Layout); jPanel8.add(jPanel9, BorderLayout.NORTH); { jMemoryAddressComboBox = new JComboBox(); jPanel9.add(jMemoryAddressComboBox); jMemoryAddressComboBox.setSelectedItem("0x00000000"); jMemoryAddressComboBox.setEditable(true); jMemoryAddressComboBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jMemoryAddressComboBoxActionPerformed(evt); } }); new Thread("addMemoryAddressComboBox thread") { public void run() { TreeSet<String> vector = Setting.getInstance().getMemoryCombo(); Iterator<String> iterator = vector.iterator(); while (iterator.hasNext()) { addMemoryAddressComboBox(iterator.next()); } } }.start(); jMemoryAddressComboBox.setSelectedItem("0x00000000"); } { jGOMemoryButton = new JButton(); jPanel9.add(jGOMemoryButton); jPanel9.add(getJGoLinearButton()); jPanel9.add(getJPreviousMemoryButton()); jPanel9.add(getJNextMemoryPageButton()); jPanel9.add(getJButton2()); jPanel9.add(getJButton5()); jGOMemoryButton.setText(MyLanguage.getString("Go")); jGOMemoryButton.setToolTipText(MyLanguage.getString("Physical_address")); jGOMemoryButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { jGOMemoryButtonActionPerformed(evt); } }); } { jBinaryRadioButton = new JRadioButton(); jPanel9.add(jBinaryRadioButton); jBinaryRadioButton.setText("2"); jBinaryRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jBinaryRadioButtonItemStateChanged(evt); } }); jBinaryRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jBinaryRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jBinaryRadioButton); } { jOctRadioButton1 = new JRadioButton(); jPanel9.add(jOctRadioButton1); jOctRadioButton1.setText("8"); jOctRadioButton1.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jOctRadioButton1ItemStateChanged(evt); } }); jOctRadioButton1.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jOctRadioButton1StateChanged(evt); } }); getButtonGroup1().add(jOctRadioButton1); } { jDecRadioButton = new JRadioButton(); jPanel9.add(jDecRadioButton); jDecRadioButton.setText("10"); jDecRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jDecRadioButtonItemStateChanged(evt); } }); jDecRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jDecRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jDecRadioButton); } { jHexRadioButton = new JRadioButton(); jPanel9.add(jHexRadioButton); jHexRadioButton.setText("16"); jHexRadioButton.setSelected(true); jHexRadioButton.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent evt) { jHexRadioButtonItemStateChanged(evt); } }); jHexRadioButton.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent evt) { jHexRadioButtonStateChanged(evt); } }); getButtonGroup1().add(jHexRadioButton); } } } { jPanel5 = new JPanel(); jTabbedPane3 .addTab(MyLanguage.getString("GDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/gdt.png")), jPanel5, null); BorderLayout jPanel5Layout = new BorderLayout(); jPanel5.setLayout(jPanel5Layout); { jScrollPane3 = new JScrollPane(); jPanel5.add(jScrollPane3, BorderLayout.CENTER); jPanel5.add(getJPanel14(), BorderLayout.NORTH); { GDTTableModel jGDTTableModel = new GDTTableModel(); jGDTTable = new JTable(); jGDTTable.setModel(jGDTTableModel); jScrollPane3.setViewportView(jGDTTable); jGDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jGDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jGDTTable.getTableHeader().setReorderingAllowed(false); jGDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jGDTTableMouseClicked(evt); } }); } } } { jPanel6 = new JPanel(); BorderLayout jPanel6Layout = new BorderLayout(); jPanel6.setLayout(jPanel6Layout); jTabbedPane3 .addTab(MyLanguage.getString("IDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/idt.png")), jPanel6, null); { jScrollPane10 = new JScrollPane(); jPanel6.add(jScrollPane10, BorderLayout.CENTER); jPanel6.add(getJPanel15(), BorderLayout.NORTH); { IDTTableModel jIDTTableModel = new IDTTableModel(); jIDTTable = new JTable(); jIDTTable.setModel(jIDTTableModel); jScrollPane10.setViewportView(jIDTTable); jIDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jIDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jIDTTable.getTableHeader().setReorderingAllowed(false); jIDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jIDTTableMouseClicked(evt); } }); } } } { jPanel7 = new JPanel(); BorderLayout jPanel7Layout = new BorderLayout(); jPanel7.setLayout(jPanel7Layout); jTabbedPane3 .addTab(MyLanguage.getString("LDT"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/ldt.png")), jPanel7, null); jTabbedPane3.addTab(MyLanguage.getString("Search_memory"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/memory.png")), getJPanel17(), null); jTabbedPane3.addTab("bochsout.txt", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/script.png")), getJPanel31(), null); { jScrollPane11 = new JScrollPane(); jPanel7.add(jScrollPane11, BorderLayout.CENTER); jPanel7.add(getJPanel16(), BorderLayout.NORTH); { LDTTableModel jLDTTableModel = new LDTTableModel(); jLDTTable = new JTable(); jLDTTable.setModel(jLDTTableModel); jScrollPane11.setViewportView(jLDTTable); jLDTTable.getColumnModel().getColumn(0).setMaxWidth(40); jLDTTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); jLDTTable.getTableHeader().setReorderingAllowed(false); jLDTTable.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent evt) { jLDTTableMouseClicked(evt); } }); } } } } } { jTabbedPane2 = new JMaximizableTabbedPane(); // jTabbedPane2.setCloseIcon(true); // jTabbedPane2.setMaxIcon(true); // // jTabbedPane2.addCloseListener(new CloseListener() { // public void closeOperation(MouseEvent e) { // jTabbedPane2.remove(jTabbedPane2.getOverTabIndex()); // } // }); // // jTabbedPane2.addMaxListener(new MaxListener() { // public void maxOperation(MouseEvent e) { // jTabbedPane2.detachTab(jTabbedPane2.getOverTabIndex()); // } // }); jSplitPane2.add(jTabbedPane2, JSplitPane.BOTTOM); { registerPanelScrollPane = new JScrollPane(); jTabbedPane2.addTab(MyLanguage.getString("Register"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/text_kerning.png")), registerPanelScrollPane, null); { registerPanel = new RegisterPanel(this); registerPanelScrollPane.setViewportView(registerPanel); } } { jPanel3 = new JPanel(); jTabbedPane2.addTab(MyLanguage.getString("History"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/book_addresses.png")), jPanel3, null); BorderLayout jPanel3Layout = new BorderLayout(); jPanel3.setLayout(jPanel3Layout); { jScrollPane6 = new JScrollPane(); jPanel3.add(jScrollPane6, BorderLayout.CENTER); jPanel3.add(getJPanel13(), BorderLayout.NORTH); jScrollPane6.setViewportView(getJHistoryTable()); } } { jPanel11 = new JPanel(); jTabbedPane2 .addTab(MyLanguage.getString("Paging"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_copy.png")), jPanel11, null); jTabbedPane2.addTab(MyLanguage.getString("Address_translate"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_go.png")), getJAddressTranslatePanel(), null); jTabbedPane2.addTab("Page table graph (experimental)", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_lightning.png")), getJPageTableGraphPanel(), null); if (!Global.debug) { jTabbedPane2.removeTabAt(jTabbedPane2.getTabCount() - 1); } jTabbedPane2.addTab(MyLanguage.getString("Table_translate"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/page_refresh.png")), getJTableTranslateScrollPane(), null); jTabbedPane2.addTab(MyLanguage.getString("ELF_dump"), new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/linux.png")), getJELFDumpScrollPane(), null); jTabbedPane2.addTab("OS debug informations", new ImageIcon(getClass().getClassLoader() .getResource("com/peterbochs/icons/famfam_icons/bug.png")), getJOSDebugStandardPanel(), null); BorderLayout jPanel11Layout = new BorderLayout(); jPanel11.setLayout(jPanel11Layout); jPanel11.add(getJSplitPane3(), BorderLayout.CENTER); jPanel11.add(getJPanel19(), BorderLayout.NORTH); } } return jSplitPane2; }
From source file:net.sourceforge.squirrel_sql.client.gui.HelpViewerWindow.java
/** * Create user interface.// www . jav a2 s. co m */ private void createGUI() throws IOException { setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); final SquirrelResources rsrc = _app.getResources(); final ImageIcon icon = rsrc.getIcon(SquirrelResources.IImageNames.VIEW); if (icon != null) { setIconImage(icon.getImage()); } Container contentPane = getContentPane(); contentPane.setLayout(new BorderLayout()); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); splitPane.setBorder(BorderFactory.createEmptyBorder()); splitPane.setOneTouchExpandable(true); splitPane.setContinuousLayout(true); splitPane.add(createContentsTree(), JSplitPane.LEFT); splitPane.add(createDetailsPanel(), JSplitPane.RIGHT); contentPane.add(splitPane, BorderLayout.CENTER); splitPane.setDividerLocation(200); contentPane.add(new HtmlViewerPanelToolBar(_app, _detailPnl), BorderLayout.NORTH); Font fn = _app.getFontInfoStore().getStatusBarFontInfo().createFont(); _statusBar.setFont(fn); contentPane.add(_statusBar, BorderLayout.SOUTH); pack(); SwingUtilities.invokeLater(new Runnable() { public void run() { _detailPnl.setHomeURL(_homeURL); _tree.expandRow(0); _tree.expandRow(2); if (_app.getSquirrelPreferences().isFirstRun()) { _tree.setSelectionRow(1); } else { _tree.setSelectionRow(3); } _tree.setRootVisible(false); } }); _detailPnl.addListener(new IHtmlViewerPanelListener() { public void currentURLHasChanged(HtmlViewerPanelListenerEvent evt) { selectTreeNodeForURL(evt.getHtmlViewerPanel().getURL()); } public void homeURLHasChanged(HtmlViewerPanelListenerEvent evt) { // Nothing to do. } }); }
From source file:org.jcurl.demo.smack.JCurlSmackClient.java
@Override protected void startup() { getMainFrame().setJMenuBar(createMenuBar()); miRoster.setSelected(true);//from w w w. j a v a 2 s . c o m final JComponent pv = new JPanel(); pv.setLayout(new BorderLayout()); final Box conversation = Box.createVerticalBox(); pv.add(new JScrollPane(conversation, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED), BorderLayout.CENTER); pv.add(new JScrollPane(sca, ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS), BorderLayout.SOUTH); final JSplitPane ph = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); ph.setResizeWeight(0.8); ph.add(pv, JSplitPane.LEFT); ph.add(new JScrollPane(sro), JSplitPane.RIGHT); xmppRoster(); show(ph); // connect the jabber account new Thread(new Runnable() { public void run() { try { // get uid + pwd from a .properties file final Properties p = loadClassProps(JCurlSmackClient.class, null); acc.setUid(XmppAddress.parse(p.getProperty("acc_uid"))); acc.setPwd(p.getProperty("acc_pwd")); // login and get the present buddies acc.login(resource); SwingUtilities.invokeLater(new Runnable() { public void run() { sro.setConn(acc.getConn()); // Wire up xmpp stuff: final ChatManager cm = sro.getChatManager(); cm.addChatListener(sca); cm.addChatListener(slo); } }); } catch (final IOException e) { throw new RuntimeException("Unhandled", e); } catch (final XMPPException e) { throw new RuntimeException("Unhandled", e); } } }).start(); }