List of usage examples for javax.swing.border TitledBorder BOTTOM
int BOTTOM
To view the source code for javax.swing.border TitledBorder BOTTOM.
Click Source Link
From source file:BorderDemo.java
public BorderDemo() { super("BorderDemo"); Border blackline, etched, raisedbevel, loweredbevel, empty; //A border that puts 10 extra pixels at the sides and //bottom of each pane. Border paneEdge = BorderFactory.createEmptyBorder(0, 10, 10, 10); blackline = BorderFactory.createLineBorder(Color.black); etched = BorderFactory.createEtchedBorder(); raisedbevel = BorderFactory.createRaisedBevelBorder(); loweredbevel = BorderFactory.createLoweredBevelBorder(); empty = BorderFactory.createEmptyBorder(); //First pane: simple borders JPanel simpleBorders = new JPanel(); simpleBorders.setBorder(paneEdge);/*from w w w .java2s .c o m*/ simpleBorders.setLayout(new BoxLayout(simpleBorders, BoxLayout.Y_AXIS)); addCompForBorder(blackline, "line border", simpleBorders); addCompForBorder(etched, "etched border", simpleBorders); addCompForBorder(raisedbevel, "raised bevel border", simpleBorders); addCompForBorder(loweredbevel, "lowered bevel border", simpleBorders); addCompForBorder(empty, "empty border", simpleBorders); //Second pane: matte borders JPanel matteBorders = new JPanel(); matteBorders.setBorder(paneEdge); matteBorders.setLayout(new BoxLayout(matteBorders, BoxLayout.Y_AXIS)); //XXX: We *should* size the component so that the //XXX: icons tile OK. Without that, the icons are //XXX: likely to be cut off and look bad. ImageIcon icon = new ImageIcon("images/left.gif"); //20x22 Border border = BorderFactory.createMatteBorder(-1, -1, -1, -1, icon); addCompForBorder(border, "matte border (-1,-1,-1,-1,icon)", matteBorders); border = BorderFactory.createMatteBorder(1, 5, 1, 1, Color.red); addCompForBorder(border, "matte border (1,5,1,1,Color.red)", matteBorders); border = BorderFactory.createMatteBorder(0, 20, 0, 0, icon); addCompForBorder(border, "matte border (0,20,0,0,icon)", matteBorders); //Third pane: titled borders JPanel titledBorders = new JPanel(); titledBorders.setBorder(paneEdge); titledBorders.setLayout(new BoxLayout(titledBorders, BoxLayout.Y_AXIS)); TitledBorder titled; titled = BorderFactory.createTitledBorder("title"); addCompForBorder(titled, "default titled border" + " (default just., default pos.)", titledBorders); titled = BorderFactory.createTitledBorder(blackline, "title"); addCompForTitledBorder(titled, "titled line border" + " (centered, default pos.)", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(etched, "title"); addCompForTitledBorder(titled, "titled etched border" + " (right just., default pos.)", TitledBorder.RIGHT, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(loweredbevel, "title"); addCompForTitledBorder(titled, "titled lowered bevel border" + " (default just., above top)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP, titledBorders); titled = BorderFactory.createTitledBorder(empty, "title"); addCompForTitledBorder(titled, "titled empty border" + " (default just., bottom)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.BOTTOM, titledBorders); //Fourth pane: compound borders JPanel compoundBorders = new JPanel(); compoundBorders.setBorder(paneEdge); compoundBorders.setLayout(new BoxLayout(compoundBorders, BoxLayout.Y_AXIS)); Border redline = BorderFactory.createLineBorder(Color.red); Border compound; compound = BorderFactory.createCompoundBorder(raisedbevel, loweredbevel); addCompForBorder(compound, "compound border (two bevels)", compoundBorders); compound = BorderFactory.createCompoundBorder(redline, compound); addCompForBorder(compound, "compound border (add a red outline)", compoundBorders); titled = BorderFactory.createTitledBorder(compound, "title", TitledBorder.CENTER, TitledBorder.BELOW_BOTTOM); addCompForBorder(titled, "titled compound border" + " (centered, below bottom)", compoundBorders); JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.addTab("Simple", null, simpleBorders, null); tabbedPane.addTab("Matte", null, matteBorders, null); tabbedPane.addTab("Titled", null, titledBorders, null); tabbedPane.addTab("Compound", null, compoundBorders, null); tabbedPane.setSelectedIndex(0); getContentPane().add(tabbedPane, BorderLayout.CENTER); }
From source file:components.BorderDemo.java
public BorderDemo() { super(new GridLayout(1, 0)); //Keep references to the next few borders, //for use in titles and compound borders. Border blackline, raisedetched, loweredetched, raisedbevel, loweredbevel, empty; //A border that puts 10 extra pixels at the sides and //bottom of each pane. Border paneEdge = BorderFactory.createEmptyBorder(0, 10, 10, 10); blackline = BorderFactory.createLineBorder(Color.black); raisedetched = BorderFactory.createEtchedBorder(EtchedBorder.RAISED); loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); raisedbevel = BorderFactory.createRaisedBevelBorder(); loweredbevel = BorderFactory.createLoweredBevelBorder(); empty = BorderFactory.createEmptyBorder(); //First pane: simple borders JPanel simpleBorders = new JPanel(); simpleBorders.setBorder(paneEdge);//from w w w.j av a2s .c om simpleBorders.setLayout(new BoxLayout(simpleBorders, BoxLayout.Y_AXIS)); addCompForBorder(blackline, "line border", simpleBorders); addCompForBorder(raisedetched, "raised etched border", simpleBorders); addCompForBorder(loweredetched, "lowered etched border", simpleBorders); addCompForBorder(raisedbevel, "raised bevel border", simpleBorders); addCompForBorder(loweredbevel, "lowered bevel border", simpleBorders); addCompForBorder(empty, "empty border", simpleBorders); //Second pane: matte borders JPanel matteBorders = new JPanel(); matteBorders.setBorder(paneEdge); matteBorders.setLayout(new BoxLayout(matteBorders, BoxLayout.Y_AXIS)); ImageIcon icon = createImageIcon("images/wavy.gif", "wavy-line border icon"); //20x22 Border border = BorderFactory.createMatteBorder(-1, -1, -1, -1, icon); if (icon != null) { addCompForBorder(border, "matte border (-1,-1,-1,-1,icon)", matteBorders); } else { addCompForBorder(border, "matte border (-1,-1,-1,-1,<null-icon>)", matteBorders); } border = BorderFactory.createMatteBorder(1, 5, 1, 1, Color.red); addCompForBorder(border, "matte border (1,5,1,1,Color.red)", matteBorders); border = BorderFactory.createMatteBorder(0, 20, 0, 0, icon); if (icon != null) { addCompForBorder(border, "matte border (0,20,0,0,icon)", matteBorders); } else { addCompForBorder(border, "matte border (0,20,0,0,<null-icon>)", matteBorders); } //Third pane: titled borders JPanel titledBorders = new JPanel(); titledBorders.setBorder(paneEdge); titledBorders.setLayout(new BoxLayout(titledBorders, BoxLayout.Y_AXIS)); TitledBorder titled; titled = BorderFactory.createTitledBorder("title"); addCompForBorder(titled, "default titled border" + " (default just., default pos.)", titledBorders); titled = BorderFactory.createTitledBorder(blackline, "title"); addCompForTitledBorder(titled, "titled line border" + " (centered, default pos.)", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(loweredetched, "title"); addCompForTitledBorder(titled, "titled lowered etched border" + " (right just., default pos.)", TitledBorder.RIGHT, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(loweredbevel, "title"); addCompForTitledBorder(titled, "titled lowered bevel border" + " (default just., above top)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP, titledBorders); titled = BorderFactory.createTitledBorder(empty, "title"); addCompForTitledBorder(titled, "titled empty border" + " (default just., bottom)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.BOTTOM, titledBorders); //Fourth pane: compound borders JPanel compoundBorders = new JPanel(); compoundBorders.setBorder(paneEdge); compoundBorders.setLayout(new BoxLayout(compoundBorders, BoxLayout.Y_AXIS)); Border redline = BorderFactory.createLineBorder(Color.red); Border compound; compound = BorderFactory.createCompoundBorder(raisedbevel, loweredbevel); addCompForBorder(compound, "compound border (two bevels)", compoundBorders); compound = BorderFactory.createCompoundBorder(redline, compound); addCompForBorder(compound, "compound border (add a red outline)", compoundBorders); titled = BorderFactory.createTitledBorder(compound, "title", TitledBorder.CENTER, TitledBorder.BELOW_BOTTOM); addCompForBorder(titled, "titled compound border" + " (centered, below bottom)", compoundBorders); JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.addTab("Simple", null, simpleBorders, null); tabbedPane.addTab("Matte", null, matteBorders, null); tabbedPane.addTab("Titled", null, titledBorders, null); tabbedPane.addTab("Compound", null, compoundBorders, null); tabbedPane.setSelectedIndex(0); String toolTip = new String( "<html>Blue Wavy Line border art crew:<br> Bill Pauley<br> Cris St. Aubyn<br> Ben Wronsky<br> Nathan Walrath<br> Tommy Adams, special consultant</html>"); tabbedPane.setToolTipTextAt(1, toolTip); add(tabbedPane); }
From source file:BorderDemo.java
public BorderDemo() { super(new GridLayout(1, 0)); // Keep references to the next few borders, // for use in titles and compound borders. Border blackline, raisedetched, loweredetched, raisedbevel, loweredbevel, empty; // A border that puts 10 extra pixels at the sides and // bottom of each pane. Border paneEdge = BorderFactory.createEmptyBorder(0, 10, 10, 10); blackline = BorderFactory.createLineBorder(Color.black); raisedetched = BorderFactory.createEtchedBorder(EtchedBorder.RAISED); loweredetched = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); raisedbevel = BorderFactory.createRaisedBevelBorder(); loweredbevel = BorderFactory.createLoweredBevelBorder(); empty = BorderFactory.createEmptyBorder(); // First pane: simple borders JPanel simpleBorders = new JPanel(); simpleBorders.setBorder(paneEdge);//from w w w . j a va2 s. co m simpleBorders.setLayout(new BoxLayout(simpleBorders, BoxLayout.Y_AXIS)); addCompForBorder(blackline, "line border", simpleBorders); addCompForBorder(raisedetched, "raised etched border", simpleBorders); addCompForBorder(loweredetched, "lowered etched border", simpleBorders); addCompForBorder(raisedbevel, "raised bevel border", simpleBorders); addCompForBorder(loweredbevel, "lowered bevel border", simpleBorders); addCompForBorder(empty, "empty border", simpleBorders); // Second pane: matte borders JPanel matteBorders = new JPanel(); matteBorders.setBorder(paneEdge); matteBorders.setLayout(new BoxLayout(matteBorders, BoxLayout.Y_AXIS)); ImageIcon icon = createImageIcon("images/wavy.gif", "wavy-line border icon"); // 20x22 Border border = BorderFactory.createMatteBorder(-1, -1, -1, -1, icon); if (icon != null) { addCompForBorder(border, "matte border (-1,-1,-1,-1,icon)", matteBorders); } else { addCompForBorder(border, "matte border (-1,-1,-1,-1,<null-icon>)", matteBorders); } border = BorderFactory.createMatteBorder(1, 5, 1, 1, Color.red); addCompForBorder(border, "matte border (1,5,1,1,Color.red)", matteBorders); border = BorderFactory.createMatteBorder(0, 20, 0, 0, icon); if (icon != null) { addCompForBorder(border, "matte border (0,20,0,0,icon)", matteBorders); } else { addCompForBorder(border, "matte border (0,20,0,0,<null-icon>)", matteBorders); } // Third pane: titled borders JPanel titledBorders = new JPanel(); titledBorders.setBorder(paneEdge); titledBorders.setLayout(new BoxLayout(titledBorders, BoxLayout.Y_AXIS)); TitledBorder titled; titled = BorderFactory.createTitledBorder("title"); addCompForBorder(titled, "default titled border" + " (default just., default pos.)", titledBorders); titled = BorderFactory.createTitledBorder(blackline, "title"); addCompForTitledBorder(titled, "titled line border" + " (centered, default pos.)", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(loweredetched, "title"); addCompForTitledBorder(titled, "titled lowered etched border" + " (right just., default pos.)", TitledBorder.RIGHT, TitledBorder.DEFAULT_POSITION, titledBorders); titled = BorderFactory.createTitledBorder(loweredbevel, "title"); addCompForTitledBorder(titled, "titled lowered bevel border" + " (default just., above top)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.ABOVE_TOP, titledBorders); titled = BorderFactory.createTitledBorder(empty, "title"); addCompForTitledBorder(titled, "titled empty border" + " (default just., bottom)", TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.BOTTOM, titledBorders); // Fourth pane: compound borders JPanel compoundBorders = new JPanel(); compoundBorders.setBorder(paneEdge); compoundBorders.setLayout(new BoxLayout(compoundBorders, BoxLayout.Y_AXIS)); Border redline = BorderFactory.createLineBorder(Color.red); Border compound; compound = BorderFactory.createCompoundBorder(raisedbevel, loweredbevel); addCompForBorder(compound, "compound border (two bevels)", compoundBorders); compound = BorderFactory.createCompoundBorder(redline, compound); addCompForBorder(compound, "compound border (add a red outline)", compoundBorders); titled = BorderFactory.createTitledBorder(compound, "title", TitledBorder.CENTER, TitledBorder.BELOW_BOTTOM); addCompForBorder(titled, "titled compound border" + " (centered, below bottom)", compoundBorders); JTabbedPane tabbedPane = new JTabbedPane(); tabbedPane.addTab("Simple", null, simpleBorders, null); tabbedPane.addTab("Matte", null, matteBorders, null); tabbedPane.addTab("Titled", null, titledBorders, null); tabbedPane.addTab("Compound", null, compoundBorders, null); tabbedPane.setSelectedIndex(0); String toolTip = new String( "<html>Blue Wavy Line border art crew:<br> Bill Pauley<br> Cris St. Aubyn<br> Ben Wronsky<br> Nathan Walrath<br> Tommy Adams, special consultant</html>"); tabbedPane.setToolTipTextAt(1, toolTip); add(tabbedPane); }
From source file:finale.year.stage.main.Authentification.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./*from w w w. j av a2 s .com*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - unknown private void initComponents() { innerPanel = new JPanel(); emailField = new JTextField(); rememberMe = new JCheckBox(); logInBtn = new JButton(); passWord = new JPasswordField(); signUpBtn = new JButton(); forgotBtn = new JButton(); userIcon = new JLabel(); passwordIcon = new JLabel(); errorStatusBar = new JLabel(); //======== this ======== // JFormDesigner evaluation mark setBorder( new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); setLayout(new GridBagLayout()); //======== innerPanel ======== { innerPanel.setBorder(new EtchedBorder()); //---- emailField ---- emailField.setText("Email"); emailField.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { emailFieldActionPerformed(e); } }); //---- rememberMe ---- rememberMe.setText("Remember me"); rememberMe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { rememberMeActionPerformed(e); } }); //---- logInBtn ---- logInBtn.setText("Log In"); logInBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { logInBtnActionPerformed(e); } }); //---- passWord ---- passWord.setText("password"); //---- signUpBtn ---- signUpBtn.setText("Sign Up"); signUpBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { signUpBtnActionPerformed(e); } }); //---- forgotBtn ---- forgotBtn.setText("Forgot Password?"); forgotBtn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { forgotBtnActionPerformed(e); } }); //---- userIcon ---- userIcon.setIcon(new ImageIcon(getClass().getResource("/Resources/glyphicons_user.png"))); //---- passwordIcon ---- passwordIcon.setIcon(new ImageIcon(getClass().getResource("/Resources/glyphicons_lock.png"))); GroupLayout innerPanelLayout = new GroupLayout(innerPanel); innerPanel.setLayout(innerPanelLayout); innerPanelLayout.setHorizontalGroup(innerPanelLayout.createParallelGroup().addGroup(innerPanelLayout .createSequentialGroup() .addGroup(innerPanelLayout.createParallelGroup() .addGroup(innerPanelLayout.createSequentialGroup().addGap(106, 106, 106) .addComponent(forgotBtn)) .addGroup(innerPanelLayout.createSequentialGroup().addGap(73, 73, 73) .addGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(userIcon, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE) .addComponent(passwordIcon, GroupLayout.PREFERRED_SIZE, 45, GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(innerPanelLayout .createParallelGroup(GroupLayout.Alignment.TRAILING, false) .addComponent(passWord).addComponent(emailField, GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE))) .addGroup(innerPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING, false) .addGroup(innerPanelLayout.createSequentialGroup().addGap(106, 106, 106) .addComponent(rememberMe) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(logInBtn, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE)) .addGroup(innerPanelLayout.createSequentialGroup().addGap(375, 375, 375) .addComponent(signUpBtn, GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE))) .addGroup(innerPanelLayout.createSequentialGroup().addGap(218, 218, 218) .addComponent(errorStatusBar))) .addContainerGap(100, Short.MAX_VALUE))); innerPanelLayout.setVerticalGroup(innerPanelLayout.createParallelGroup().addGroup(innerPanelLayout .createSequentialGroup().addContainerGap().addComponent(errorStatusBar).addGap(30, 30, 30) .addGroup(innerPanelLayout.createParallelGroup() .addComponent(userIcon, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE) .addComponent(emailField, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30) .addGroup(innerPanelLayout.createParallelGroup() .addComponent(passwordIcon, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE) .addComponent(passWord, GroupLayout.PREFERRED_SIZE, 38, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup( innerPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(rememberMe, GroupLayout.PREFERRED_SIZE, 59, GroupLayout.PREFERRED_SIZE) .addComponent(logInBtn)) .addGap(6, 6, 6).addComponent(forgotBtn).addGap(6, 6, 6).addComponent(signUpBtn) .addContainerGap(69, Short.MAX_VALUE))); } add(innerPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.NORTHWEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), -20, 4)); }
From source file:customize.swing.startMain.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - unknown panel1 = new JPanel(); JPanel panel2 = new JPanel(); JScrollPane scrollPane1 = new JScrollPane(); JPanel panel3 = new JPanel(); JPanel panel4 = new JPanel(); JPanel panel5 = new JPanel(); textField6 = new JTextField(); JPanel panel6 = new JPanel(); JLabel label1 = new JLabel(); JPanel panel7 = new JPanel(); JLabel label2 = new JLabel(); JPanel panel8 = new JPanel(); JLabel label3 = new JLabel(); JPanel panel9 = new JPanel(); textField2 = new JTextField(); ButtonView = new JButton(); JPanel panel10 = new JPanel(); textField7 = new JTextField(); JPanel panel11 = new JPanel(); textField1 = new JTextField(); JPanel panel12 = new JPanel(); JLabel label4 = new JLabel(); JPanel panel13 = new JPanel(); CheckBox1 = new JCheckBox(); CheckBox2 = new JCheckBox(); JPanel panel14 = new JPanel(); genButton = new JButton(); JScrollPane scrollPane2 = new JScrollPane(); JPanel panel15 = new JPanel(); JPanel panel16 = new JPanel(); TextField = new JTextField(); JPanel panel17 = new JPanel(); textField3 = new JTextField(); JPanel panel18 = new JPanel(); rootTextField = new JTextField(); JPanel panel19 = new JPanel(); PasswordField = new JPasswordField(); JPanel panel20 = new JPanel(); textField8 = new JTextField(); JPanel panel21 = new JPanel(); JLabel label5 = new JLabel(); JPanel panel22 = new JPanel(); JLabel label6 = new JLabel(); JPanel panel23 = new JPanel(); JLabel label7 = new JLabel(); JPanel panel24 = new JPanel(); JLabel label8 = new JLabel(); JPanel panel25 = new JPanel(); JLabel label9 = new JLabel(); JScrollPane scrollPane3 = new JScrollPane(); jscrollPane1 = new JTextPane(); //======== panel1 ======== {//from w w w . j a v a2 s.c o m // JFormDesigner evaluation mark panel1.setBorder(new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), panel1.getBorder())); panel1.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); panel1.setLayout(new GridLayoutManager(5, 1, new Insets(0, 0, 0, 0), -1, -1)); //======== panel2 ======== { panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1)); //======== scrollPane1 ======== { scrollPane1.setBorder(new TitledBorder("\u6587\u4ef6\u751f\u6210\u5730\u5740")); //======== panel3 ======== { panel3.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1)); //======== panel4 ======== { panel4.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //======== panel5 ======== { panel5.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- textField6 ---- textField6.setEditable(true); textField6.setEnabled(true); textField6.setText(""); textField6.putClientProperty("html.disable", false); panel5.add(textField6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel4.add(panel5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); } panel3.add(panel4, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel6 ======== { panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label1 ---- label1.setText("xml\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b"); panel6.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel6, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel7 ======== { panel7.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label2 ---- label2.setText("model\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b"); panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel7, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel8 ======== { panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label3 ---- label3.setText("\u6587\u4ef6\u7edf\u4e00\u751f\u6210\u8def\u5f84"); panel8.add(label3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel8, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel9 ======== { panel9.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); panel9.add(textField2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); //---- ButtonView ---- ButtonView.setText("\u6d4f\u89c8"); panel9.add(ButtonView, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel9, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel10 ======== { panel10.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- textField7 ---- textField7.setEditable(true); textField7.setEnabled(true); textField7.setText(""); textField7.putClientProperty("html.disable", true); panel10.add(textField7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel10, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel11 ======== { panel11.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- textField1 ---- textField1.setEditable(true); textField1.setEnabled(true); textField1.setText(""); textField1.putClientProperty("html.disable", true); panel11.add(textField1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel11, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel12 ======== { panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label4 ---- label4.setText("dao\u5c42\u751f\u6210\u5728\u54ea\u4e2a\u5305\u540d\u4e0b"); panel12.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel3.add(panel12, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); } scrollPane1.setViewportView(panel3); } panel2.add(scrollPane1, new GridConstraints(0, 0, 1, 3, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null)); } panel1.add(panel2, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel13 ======== { panel13.setBorder(new TitledBorder("\u53ef\u914d\u7f6e\u9879")); panel13.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1)); //---- CheckBox1 ---- CheckBox1.setSelected(true); CheckBox1.setText("\u662f\u5426\u4e3a\u9a7c\u5cf0\u547d\u540d\u89c4\u8303"); panel13.add(CheckBox1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); //---- CheckBox2 ---- CheckBox2.setSelected(true); CheckBox2.setText("\u662f\u5426\u751f\u6210\u6ce8\u91ca"); panel13.add(CheckBox2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel1.add(panel13, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel14 ======== { panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- genButton ---- genButton.setText("\u751f\u6210"); panel14.add(genButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel1.add(panel14, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== scrollPane2 ======== { scrollPane2.setBorder(new TitledBorder("\u5fc5\u586b\u9879")); //======== panel15 ======== { panel15.setLayout(new GridLayoutManager(5, 2, new Insets(0, 0, 0, 0), -1, -1)); //======== panel16 ======== { panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- TextField ---- TextField.setText("com.mysql.jdbc.Driver"); panel16.add(TextField, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel16, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel17 ======== { panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- textField3 ---- textField3.setText("jdbc:mysql://192.168.0.13/mvp?characterEncoding=UTF-8"); panel17.add(textField3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel17, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel18 ======== { panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- rootTextField ---- rootTextField.setText("root"); panel18.add(rootTextField, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel18, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel19 ======== { panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- PasswordField ---- PasswordField.setText("elab@123"); panel19.add(PasswordField, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel19, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel20 ======== { panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- textField8 ---- textField8.setText(""); panel20.add(textField8, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel20, new GridConstraints(4, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel21 ======== { panel21.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label5 ---- label5.setText("\u6570\u636e\u5e93\u9a71\u52a8:"); panel21.add(label5, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel21, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel22 ======== { panel22.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label6 ---- label6.setText("\u6570\u636e\u5e93\u8fde\u63a5\u5730\u5740:"); panel22.add(label6, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel22, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel23 ======== { panel23.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label7 ---- label7.setText("\u6570\u636e\u5e93\u7528\u6237\u540d:"); panel23.add(label7, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel23, new GridConstraints(2, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel24 ======== { panel24.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label8 ---- label8.setText("\u6570\u636e\u5e93\u5bc6\u7801:"); panel24.add(label8, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel24, new GridConstraints(3, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); //======== panel25 ======== { panel25.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1)); //---- label9 ---- label9.setText("\u8868\u540d(\u53ef\u6a21\u7cca%)"); panel25.add(label9, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null)); } panel15.add(panel25, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null)); } scrollPane2.setViewportView(panel15); } panel1.add(scrollPane2, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null)); //======== scrollPane3 ======== { scrollPane3.setBorder(new TitledBorder("\u6ce8\u610f\u4e8b\u9879")); //---- jscrollPane1 ---- jscrollPane1.setEditable(true); jscrollPane1.setEnabled(true); jscrollPane1.setText( "\t1.\u8bf7\u4e0d\u8981\u91cd\u590d\u751f\u6210\u540c\u6837\u7684\u6587\u4ef6\u5728\u540c\u4e00\u4e2a\u76ee\u5f55\u5939\u4e0b\u3002"); scrollPane3.setViewportView(jscrollPane1); } panel1.add(scrollPane3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null)); } // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:aplicarFiltros.PanelResultado.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Sebastian Colavita DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); panel2 = new JPanel(); panel1 = new JPanel(); scrollPaneRasgos2 = new JScrollPane(); tableRasgos2 = new JTable(); button1 = new JButton(); separator1 = compFactory.createSeparator("Clasificaci\u00f3n"); label1 = new JLabel(); resultado = new JLabel(); label2 = new JLabel(); Descuento = new JLabel(); panel3 = new JPanel(); panelGraficoPixel = new JPanel(); //======== this ======== // JFormDesigner evaluation mark setBorder(/*from ww w.ja va 2s. c o m*/ new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); setLayout(null); //======== panel2 ======== { panel2.setBackground(Color.blue); panel2.setLayout(null); //======== panel1 ======== { panel1.setBorder(new BevelBorder(BevelBorder.RAISED)); panel1.setLayout(null); //======== scrollPaneRasgos2 ======== { //---- tableRasgos2 ---- tableRasgos2.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Clasificaciones", "Cantidad", "Porcentaje Area" }) { Class<?>[] columnTypes = new Class<?>[] { String.class, String.class, Object.class }; @Override public Class<?> getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } }); tableRasgos2.setPreferredScrollableViewportSize(new Dimension(200, 100)); tableRasgos2.setBackground(UIManager.getColor("RadioButton.light")); tableRasgos2.setCellSelectionEnabled(true); scrollPaneRasgos2.setViewportView(tableRasgos2); } panel1.add(scrollPaneRasgos2); scrollPaneRasgos2.setBounds(10, 60, 605, 155); //---- button1 ---- button1.setIcon(new ImageIcon("\\\\img\\\\maiz_mon810_al.jpg")); panel1.add(button1); button1.setBounds(620, 60, 225, 155); panel1.add(separator1); separator1.setBounds(10, 5, 835, separator1.getPreferredSize().height); //---- label1 ---- label1.setText("Resultado:"); label1.setFont(new Font("Times New Roman", Font.BOLD, 13)); panel1.add(label1); label1.setBounds(10, 35, 67, label1.getPreferredSize().height); //---- resultado ---- resultado.setText("Grado A"); resultado.setFont(new Font("Times New Roman", Font.BOLD, 13)); resultado.setForeground(Color.blue); panel1.add(resultado); resultado.setBounds(79, 35, 171, 19); //---- label2 ---- label2.setText(" Descuento:"); label2.setFont(new Font("Times New Roman", Font.BOLD, 13)); panel1.add(label2); label2.setBounds(250, 35, 72, 19); //---- Descuento ---- Descuento.setText("10%"); Descuento.setFont(new Font("Times New Roman", Font.BOLD, 13)); Descuento.setForeground(Color.blue); panel1.add(Descuento); Descuento.setBounds(320, 35, 60, Descuento.getPreferredSize().height); { // compute preferred size Dimension preferredSize = new Dimension(); for (int i = 0; i < panel1.getComponentCount(); i++) { Rectangle bounds = panel1.getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = panel1.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; panel1.setMinimumSize(preferredSize); panel1.setPreferredSize(preferredSize); } } panel2.add(panel1); panel1.setBounds(15, 10, 856, 225); //======== panel3 ======== { panel3.setBorder(new TitledBorder("Gr\u00e1ficos")); panel3.setLayout(new BoxLayout(panel3, BoxLayout.Y_AXIS)); //======== panelGraficoPixel ======== { panelGraficoPixel.setLayout(null); { // compute preferred size Dimension preferredSize = new Dimension(); for (int i = 0; i < panelGraficoPixel.getComponentCount(); i++) { Rectangle bounds = panelGraficoPixel.getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = panelGraficoPixel.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; panelGraficoPixel.setMinimumSize(preferredSize); panelGraficoPixel.setPreferredSize(preferredSize); } } panel3.add(panelGraficoPixel); } panel2.add(panel3); panel3.setBounds(13, 245, 857, 355); { // compute preferred size Dimension preferredSize = new Dimension(); for (int i = 0; i < panel2.getComponentCount(); i++) { Rectangle bounds = panel2.getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = panel2.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; panel2.setMinimumSize(preferredSize); panel2.setPreferredSize(preferredSize); } } add(panel2); panel2.setBounds(10, 5, 883, 610); { // compute preferred size Dimension preferredSize = new Dimension(); for (int i = 0; i < getComponentCount(); i++) { Rectangle bounds = getComponent(i).getBounds(); preferredSize.width = Math.max(bounds.x + bounds.width, preferredSize.width); preferredSize.height = Math.max(bounds.y + bounds.height, preferredSize.height); } Insets insets = getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; setMinimumSize(preferredSize); setPreferredSize(preferredSize); } // JFormDesigner - End of component initialization //GEN-END:initComponents button1.setIcon(new ImageIcon("img\\maiz_mon810_al.jpg")); }
From source file:JXButtonPanel.java
private JPanel createButtonJXButtonPanel() { JPanel ret = new JPanel(new BorderLayout()); JLabel label = new JLabel("Does JXButtonPanel support arrow keys ?"); label.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0)); JPanel temp = new JPanel(); temp.add(label);//from w ww . ja va2 s .co m ret.add(temp); JXButtonPanel panel = new JXButtonPanel(); panel.setCyclic(true); panel.add(new JButton("Yes")); panel.add(new JButton("Sure")); panel.add(new JButton("Absolutely !")); panel.setBorder(BorderFactory.createTitledBorder(null, "JXButtonPanel.setCyclic(true)", TitledBorder.CENTER, TitledBorder.BOTTOM)); ret.setBorder(BorderFactory.createEmptyBorder(10, 0, 10, 0)); ret.add(panel, BorderLayout.SOUTH); return ret; }
From source file:ru.goodfil.catalog.ui.forms.OePanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - ????? ??????? panel1 = new JPanel(); panel2 = new JPanel(); btnCreateBrand = new JButton(); btnEditBrand = new JButton(); btnRemoveBrand = new JButton(); btnUnionBrand = new JButton(); hSpacer1 = new JPanel(null); tbSearchBrand = new JTextField(); btnSearchBrand = new JButton(); scrollPane1 = new JScrollPane(); lstBrands = new JList(); lLstBrandsStatus = new JLabel(); panel3 = new JPanel(); panel4 = new JPanel(); btnCreateOe = new JButton(); btnEditOe = new JButton(); btnRemoveOe = new JButton(); btnUnionOe = new JButton(); hSpacer2 = new JPanel(null); tbSearchOe = new JTextField(); btnSearchOe = new JButton(); scrollPane2 = new JScrollPane(); lstOes = new JList(); lLstOesStatus = new JLabel(); popupMenu1 = new JPopupMenu(); menuItem1 = new JMenuItem(); menuItem2 = new JMenuItem(); menuItem3 = new JMenuItem(); menuItem4 = new JMenuItem(); popupMenu2 = new JPopupMenu(); menu1 = new JMenu(); menuItem5 = new JMenuItem(); menuItem6 = new JMenuItem(); CellConstraints cc = new CellConstraints(); //======== this ======== // JFormDesigner evaluation mark setBorder(/*from ww w.j av a 2 s . c o m*/ new javax.swing.border.CompoundBorder( new javax.swing.border.TitledBorder(new javax.swing.border.EmptyBorder(0, 0, 0, 0), "JFormDesigner Evaluation", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.BOTTOM, new java.awt.Font("Dialog", java.awt.Font.BOLD, 12), java.awt.Color.red), getBorder())); addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent e) { if ("border".equals(e.getPropertyName())) throw new RuntimeException(); } }); setLayout(new FormLayout("default:grow, $lcgap, default:grow", "fill:default:grow")); //======== panel1 ======== { panel1.setBorder(new TitledBorder( "\u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438")); panel1.setLayout( new FormLayout("default:grow", "fill:21dlu, $lgap, fill:default:grow, $lgap, default")); //======== panel2 ======== { panel2.setLayout(new FormLayout("4*(21dlu), default:grow, 100dlu, 21dlu", "fill:default:grow")); //---- btnCreateBrand ---- btnCreateBrand .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png"))); btnCreateBrand.setToolTipText( "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnCreateBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCreateBrandActionPerformed(e); } }); panel2.add(btnCreateBrand, cc.xy(1, 1)); //---- btnEditBrand ---- btnEditBrand .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png"))); btnEditBrand.setToolTipText( "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnEditBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditBrandActionPerformed(e); } }); panel2.add(btnEditBrand, cc.xy(2, 1)); //---- btnRemoveBrand ---- btnRemoveBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png"))); btnRemoveBrand.setToolTipText( "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnRemoveBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnRemoveBrandActionPerformed(e); } }); panel2.add(btnRemoveBrand, cc.xy(3, 1)); //---- btnUnionBrand ---- btnUnionBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png"))); btnUnionBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnUnionBrandActionPerformed(e); } }); panel2.add(btnUnionBrand, cc.xy(4, 1)); panel2.add(hSpacer1, cc.xy(5, 1)); //---- tbSearchBrand ---- tbSearchBrand.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { tbSearchBrandKeyTyped(e); } @Override public void keyReleased(KeyEvent e) { tbSearchBrandKeyTyped(e); } @Override public void keyTyped(KeyEvent e) { tbSearchBrandKeyTyped(e); } }); tbSearchBrand.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { tbSearchBrandFocusGained(e); } @Override public void focusLost(FocusEvent e) { tbSearchBrandFocusGained(e); } }); panel2.add(tbSearchBrand, cc.xy(6, 1)); //---- btnSearchBrand ---- btnSearchBrand.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/find_next_24.png"))); btnSearchBrand.setToolTipText( "\u041f\u043e\u0438\u0441\u043a \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438"); btnSearchBrand.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSearchBrandActionPerformed(e); } }); panel2.add(btnSearchBrand, cc.xy(7, 1)); } panel1.add(panel2, cc.xy(1, 1)); //======== scrollPane1 ======== { //---- lstBrands ---- lstBrands.setToolTipText( "\u0415\u0441\u043b\u0438 \u0448\u0440\u0438\u0444\u0442 \u0411\u0440\u0435\u043d\u0434\u0430 \u0432\u044b\u0434\u0435\u043b\u0435\u043d \u043f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u043c, \u0442\u043e \u043e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u0438\u0434\u0435\u043d \u0432 \u043e\u0442\u0447\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043f\u0438\u0438, \u0434\u043b\u044f \u0432\u044b\u0433\u0440\u0443\u0437\u043e\u043a. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043d\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d, \u0442\u043e \u0432\u0438\u0434\u0435\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442."); lstBrands.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { lstBrandsValueChanged(e); } }); lstBrands.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { lstBrandsKeyPressed(e); } }); lstBrands.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lstBrandsMouseClicked(e); } }); scrollPane1.setViewportView(lstBrands); } panel1.add(scrollPane1, cc.xy(1, 3)); //---- lLstBrandsStatus ---- lLstBrandsStatus.setText("text"); panel1.add(lLstBrandsStatus, cc.xy(1, 5)); } add(panel1, cc.xy(1, 1)); //======== panel3 ======== { panel3.setBorder(new TitledBorder("\u041d\u043e\u043c\u0435\u0440\u0430 \u041e\u0415")); panel3.setLayout(new FormLayout("default:grow", "default, $lgap, fill:default:grow, $lgap, default")); //======== panel4 ======== { panel4.setLayout(new FormLayout("4*(21dlu), default:grow, 100dlu, 21dlu", "fill:21dlu")); //---- btnCreateOe ---- btnCreateOe .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/add_24.png"))); btnCreateOe.setToolTipText( "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnCreateOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnCreateOeActionPerformed(e); } }); panel4.add(btnCreateOe, cc.xy(1, 1)); //---- btnEditOe ---- btnEditOe .setIcon(new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/edit_24.png"))); btnEditOe.setToolTipText( "\u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnEditOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnEditOeActionPerformed(e); } }); panel4.add(btnEditOe, cc.xy(2, 1)); //---- btnRemoveOe ---- btnRemoveOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/delete_24.png"))); btnRemoveOe.setToolTipText( "\u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0444\u0438\u043b\u044c\u0442\u0440"); btnRemoveOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnRemoveOeActionPerformed(e); } }); panel4.add(btnRemoveOe, cc.xy(3, 1)); //---- btnUnionOe ---- btnUnionOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/recycle_24.png"))); btnUnionOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnUnionOeActionPerformed(e); } }); panel4.add(btnUnionOe, cc.xy(4, 1)); panel4.add(hSpacer2, cc.xy(5, 1)); //---- tbSearchOe ---- tbSearchOe.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { tbSearchOeKeyPressed(e); } @Override public void keyReleased(KeyEvent e) { tbSearchOeKeyPressed(e); } }); tbSearchOe.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { tbSearchOeFocusGained(e); } @Override public void focusLost(FocusEvent e) { tbSearchOeFocusGained(e); } }); panel4.add(tbSearchOe, cc.xy(6, 1)); //---- btnSearchOe ---- btnSearchOe.setIcon( new ImageIcon(getClass().getResource("/ru/goodfil/catalog/ui/icons/find_next_24.png"))); btnSearchOe.setToolTipText( "\u041f\u043e\u0438\u0441\u043a \u043c\u043e\u0442\u043e\u0440\u043e\u0432 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0439 \u0441\u0435\u0440\u0438\u0438"); btnSearchOe.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnSearchOeActionPerformed(e); } }); panel4.add(btnSearchOe, cc.xy(7, 1)); } panel3.add(panel4, cc.xy(1, 1)); //======== scrollPane2 ======== { //---- lstOes ---- lstOes.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { lstOesKeyPressed(e); } }); lstOes.addListSelectionListener(new ListSelectionListener() { @Override public void valueChanged(ListSelectionEvent e) { lstOesValueChanged(e); } }); lstOes.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { lstOesMouseClicked(e); } }); scrollPane2.setViewportView(lstOes); } panel3.add(scrollPane2, cc.xy(1, 3)); //---- lLstOesStatus ---- lLstOesStatus.setText("text"); panel3.add(lLstOesStatus, cc.xy(1, 5)); } add(panel3, cc.xy(3, 1)); //======== popupMenu1 ======== { popupMenu1.addPopupMenuListener(new PopupMenuListener() { @Override public void popupMenuCanceled(PopupMenuEvent e) { } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { } @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { popupMenu1PopupMenuWillBecomeVisible(e); } }); //---- menuItem1 ---- menuItem1.setText( "\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440"); menuItem1.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { copyToClipboard(e); } }); popupMenu1.add(menuItem1); //---- menuItem2 ---- menuItem2.setText( "\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430"); menuItem2.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { pasteFromClipboard(e); } }); popupMenu1.add(menuItem2); popupMenu1.addSeparator(); //---- menuItem3 ---- menuItem3.setText( "\u041f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0431\u0443\u0444\u0435\u0440 (\u0421 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435\u043c)"); menuItem3.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { cutToClipboard(e); } }); popupMenu1.add(menuItem3); //---- menuItem4 ---- menuItem4.setText( "\u0412\u044b\u043d\u0435\u0441\u0442\u0438 \u0438\u0437 \u0431\u0443\u0444\u0435\u0440\u0430"); menuItem4.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { pasteFromClipboard(e); } }); popupMenu1.add(menuItem4); } //======== popupMenu2 ======== { //======== menu1 ======== { menu1.setText( "\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432 \u043e\u0442\u0447\u0443\u0436\u0434\u0430\u0435\u043c\u043e\u0439 \u043a\u043e\u043f\u0438\u0438"); //---- menuItem5 ---- menuItem5.setText("\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c"); menuItem5.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemReprezentInStandalone(e); } }); menu1.add(menuItem5); //---- menuItem6 ---- menuItem6.setText("\u041d\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c"); menuItem6.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { menuItemDontReprezentInStandalone(e); } }); menu1.add(menuItem6); } popupMenu2.add(menu1); } // JFormDesigner - End of component initialization //GEN-END:initComponents }