List of usage examples for javax.swing GroupLayout DEFAULT_SIZE
int DEFAULT_SIZE
To view the source code for javax.swing GroupLayout DEFAULT_SIZE.
Click Source Link
From source file:sk.stuba.fiit.kvasnicka.topologyvisual.gui.simulation.SimulationTopComponent.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 www . ja v a 2 s .c o m */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btnAdd = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtSource = new javax.swing.JTextField(); txtDest = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); txtName = new javax.swing.JTextField(); jScrollPane2 = new javax.swing.JScrollPane(); jXTable1 = new org.jdesktop.swingx.JXTable(); btnAdd.setIcon(new javax.swing.ImageIcon( getClass().getResource("/sk/stuba/fiit/kvasnicka/topologyvisual/resources/files/add.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(btnAdd, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.btnAdd.text")); // NOI18N btnAdd.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAddActionPerformed(evt); } }); jButton1.setIcon(new javax.swing.ImageIcon( getClass().getResource("/sk/stuba/fiit/kvasnicka/topologyvisual/resources/files/remove.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jButton1.text")); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setIcon(new javax.swing.ImageIcon( getClass().getResource("/sk/stuba/fiit/kvasnicka/topologyvisual/resources/files/edit.png"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jButton2.text")); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jPanel1.border.title"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jLabel1.text")); // NOI18N txtSource.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { txtSourceKeyReleased(evt); } }); txtDest.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { txtDestKeyReleased(evt); } }); org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jLabel2.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jLabel3.text")); // NOI18N txtName.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { txtNameKeyReleased(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup().addContainerGap(13, Short.MAX_VALUE) .addComponent(jLabel3).addGap(44, 44, 44) .addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 46, 46).addComponent(jLabel1).addGap(44, 44, 44) .addComponent(txtSource, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(46, 46, 46).addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtDest, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(123, 123, 123))); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(txtDest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtSource, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3).addComponent(txtName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 12, Short.MAX_VALUE))); jXTable1.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "ID", "Name", "Source", "Destination", "Ping" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.Boolean.class }; boolean[] canEdit = new boolean[] { false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); jXTable1.setColumnSelectionAllowed(true); jXTable1.setSortable(false); jXTable1.getTableHeader().setReorderingAllowed(false); jScrollPane2.setViewportView(jXTable1); jXTable1.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); jXTable1.getColumnModel().getColumn(0).setResizable(false); jXTable1.getColumnModel().getColumn(0).setHeaderValue(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jXTable1.columnModel.title2")); // NOI18N jXTable1.getColumnModel().getColumn(1).setHeaderValue(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jXTable1.columnModel.title4")); // NOI18N jXTable1.getColumnModel().getColumn(2).setHeaderValue(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jXTable1.columnModel.title0")); // NOI18N jXTable1.getColumnModel().getColumn(3).setHeaderValue(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jXTable1.columnModel.title1")); // NOI18N jXTable1.getColumnModel().getColumn(4).setMinWidth(50); jXTable1.getColumnModel().getColumn(4).setPreferredWidth(70); jXTable1.getColumnModel().getColumn(4).setMaxWidth(100); jXTable1.getColumnModel().getColumn(4).setHeaderValue(org.openide.util.NbBundle .getMessage(SimulationTopComponent.class, "SimulationTopComponent.jXTable1.columnModel.title3")); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 643, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnAdd, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(21, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addGap(34, 34, 34).addComponent(btnAdd) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton2).addGap(0, 96, Short.MAX_VALUE))) .addGap(38, 38, 38) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); }
From source file:Store.HealthSMS.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 . ja v a2s. c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); jButton2 = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); txt_msg = new javax.swing.JTextArea(); jLabel2 = new javax.swing.JLabel(); Send = new javax.swing.JButton(); clr = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); spno = new javax.swing.JTextField(); txt_no = new javax.swing.JTextField(); src_btn = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); hdate = new javax.swing.JMenu(); htime = new javax.swing.JMenu(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("SEND SMS TO PATIENTS"); setBackground(new java.awt.Color(0, 153, 51)); setFont(new java.awt.Font("Agency FB", 1, 10)); // NOI18N setResizable(false); jToolBar1.setRollover(true); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N jButton2.setToolTipText("Back"); jButton2.setFocusable(false); jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jToolBar1.add(jButton2); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jButton1.setToolTipText("Log Out"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); txt_msg.setColumns(20); txt_msg.setRows(5); txt_msg.setText("Type The Message..."); txt_msg.setToolTipText("Type The Message..."); txt_msg.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { txt_msgMouseClicked(evt); } }); jScrollPane1.setViewportView(txt_msg); jLabel2.setText("Message"); Send.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N Send.setText("Send"); Send.setToolTipText("Send SMS to Patients"); Send.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SendActionPerformed(evt); } }); clr.setText("Clear"); clr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clrActionPerformed(evt); } }); jLabel1.setText("Phone Number"); spno.setEditable(false); spno.setToolTipText("Enter The Phone Number,start +254..."); spno.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { spnoMouseClicked(evt); } }); spno.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { spnoKeyTyped(evt); } }); txt_no.setText("Enter Patient's Admittion Number to Search"); src_btn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N src_btn.setText("Search"); src_btn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { src_btnActionPerformed(evt); } }); jMenu1.setText("File"); jMenu1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenu1ActionPerformed(evt); } }); jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jMenuItem1.setText("Log Out"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); hdate.setText("Date"); jMenuBar1.add(hdate); htime.setText("Time"); jMenuBar1.add(htime); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout.createSequentialGroup().addGap(115, 115, 115).addComponent(jLabel1)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap().addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 497, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup().addGap(35, 35, 35).addComponent( jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txt_no, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(spno, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 230, Short.MAX_VALUE)) .addGap(30, 30, 30).addComponent(src_btn)))) .addGroup(layout.createSequentialGroup().addGap(272, 272, 272).addComponent(Send) .addGap(43, 43, 43).addComponent(clr))) .addContainerGap(154, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 106, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(src_btn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txt_no, javax.swing.GroupLayout.DEFAULT_SIZE, 35, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(spno, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(clr, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Send))) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18))); setSize(new java.awt.Dimension(870, 630)); setLocationRelativeTo(null); }
From source file:Store.SendToDocs.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 www .ja va 2s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); d_no = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); d_txt = new javax.swing.JTextArea(); dsend = new javax.swing.JButton(); dclr = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); txt_dssrc = new javax.swing.JTextField(); dsrc = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItem1 = new javax.swing.JMenuItem(); sdate = new javax.swing.JMenu(); stime = new javax.swing.JMenu(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jToolBar1.setRollover(true); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/lightbox-prev.png"))); // NOI18N jButton1.setToolTipText("Back"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jButton2.setToolTipText("LOg Out"); jButton2.setFocusable(false); jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jToolBar1.add(jButton2); jLabel1.setText("Message"); d_no.setEditable(false); d_no.setToolTipText("Enter Phone Number,Start +254..."); d_no.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { d_noMouseClicked(evt); } }); d_no.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { d_noKeyTyped(evt); } }); d_txt.setColumns(20); d_txt.setRows(5); d_txt.setText("Type Your Message..."); d_txt.setToolTipText("Enter Phone Number,Start +254.."); d_txt.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { d_txtMouseClicked(evt); } }); jScrollPane1.setViewportView(d_txt); dsend.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/messages-icon2.png"))); // NOI18N dsend.setText("Send"); dsend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dsendActionPerformed(evt); } }); dclr.setText("Clear"); dclr.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dclrActionPerformed(evt); } }); jLabel2.setText("Phone Number"); txt_dssrc.setText("Enter Doctor's Number To Search"); dsrc.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/search-icon.png"))); // NOI18N dsrc.setText("Search"); dsrc.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { dsrcActionPerformed(evt); } }); jMenu1.setText("File"); jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Store/icons/logout-icon_small.png"))); // NOI18N jMenuItem1.setText("Log Out"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu1.add(jMenuItem1); jMenuBar1.add(jMenu1); sdate.setText("Date"); jMenuBar1.add(sdate); stime.setText("Time"); jMenuBar1.add(stime); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(195, 195, 195) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(325, 325, 325).addComponent(dsend) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(dclr)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(135, 135, 135) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addComponent(jLabel2).addGap(32, 32, 32))) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(txt_dssrc, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d_no, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 275, Short.MAX_VALUE)) .addGap(40, 40, 40).addComponent(dsrc)) .addComponent(jScrollPane1)))) .addContainerGap(186, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(dsrc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txt_dssrc)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(d_no, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 196, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(dsend).addComponent(dclr)) .addGap(69, 69, 69))); setSize(new java.awt.Dimension(829, 535)); setLocationRelativeTo(null); }
From source file:thesaurusEditor.gui.graph.MainGraph.java
/** * create an instance of a simple graph with basic controls *//*from ww w.j av a 2 s. c o m*/ public MainGraph(List<Konzept> konzepte, Main main) { // create a simple graph for the demo this.konzepte = konzepte; this.main = main; main.getController().getThesaurus().addObserver(this); graph = new DirectedSparseGraph<Konzept, EdgeClass>(); for (Konzept k : konzepte) { graph.addVertex(k); } createEdges(konzepte); layout = new PersistentLayoutImpl<Konzept, EdgeClass>(new FRLayout<Konzept, EdgeClass>(graph)); //layout = new FRLayout<Konzept,EdgeClass>(graph); Dimension preferredSize = new Dimension(1300, 900); final VisualizationModel<Konzept, EdgeClass> visualizationModel = new DefaultVisualizationModel<Konzept, EdgeClass>( layout, preferredSize); vv = new VisualizationViewer<Konzept, EdgeClass>(visualizationModel, preferredSize); // this class will provide both label drawing and vertex shapes VertexLabelAsShapeRenderer<Konzept, EdgeClass> vlasr = new VertexLabelAsShapeRenderer<Konzept, EdgeClass>( vv.getRenderContext()); // customize the render context vv.getRenderContext().setVertexLabelTransformer(new Transformer<Konzept, String>() { public String transform(Konzept k) { return ""; } }); // this chains together Transformers so that the html tags // are prepended to the toString method output /*new ChainedTransformer<Konzept,String>(new Transformer[]{ new ToStringLabeller<Konzept>(), new Transformer<Konzept,String>() { public String transform(Konzept input) { return input.toString(); }}}));*/ vv.getRenderContext().setVertexShapeTransformer(new Transformer<Konzept, Shape>() { public Shape transform(Konzept k) { return new Rectangle(-((k.toString().length() * 8 + 10) / 2), -(10), k.toString().length() * 7 + 18, 21); } }); vv.getRenderContext().setVertexLabelRenderer(new DefaultVertexLabelRenderer(Color.red)); vv.getRenderContext().setEdgeDrawPaintTransformer(new ConstantTransformer(Color.black)); vv.getRenderContext().setEdgeStrokeTransformer(new ConstantTransformer(new BasicStroke(2.5f))); vv.getRenderContext().setVertexFillPaintTransformer( new PickableVertexPaintTransformer<Konzept>(vv.getPickedVertexState(), Color.white, Color.yellow)); vv.getRenderContext().setEdgeDrawPaintTransformer( new PickableEdgePaintTransformer<EdgeClass>(vv.getPickedEdgeState(), Color.black, Color.red)); vv.getRenderContext().setVertexIconTransformer(new Transformer<Konzept, Icon>() { /* * Implements the Icon interface to draw an Icon with background color and * a text label */ public Icon transform(final Konzept v) { return new Icon() { private Konzept k; public int getIconHeight() { return 20; } public int getIconWidth() { if (k != null) { return k.toString().length() * 7 + 10; } return v.toString().length() * 7 + 10; } public void paintIcon(Component c, Graphics g, int x, int y) { if (vv.getPickedVertexState().isPicked(v)) { g.setColor(Color.yellow); } else { g.setColor(Color.lightGray); } g.fillRect(x, y, v.toString().length() * 8 + 10, 20); if (vv.getPickedVertexState().isPicked(v)) { g.setColor(Color.black); } else { g.setColor(Color.black); } g.drawRect(x, y, v.toString().length() * 8 + 10, 20); if (vv.getPickedVertexState().isPicked(v)) { g.setColor(Color.black); } else { g.setColor(Color.black); } this.k = v; if (vv.getPickedVertexState().isPicked(v)) { Font font = new Font("DejaVu Sans Mono", Font.BOLD, 14); g.setFont(font); g.drawString("" + v, x + 6, y + 15); } else { Font font = new Font("DejaVu Sans Mono", Font.PLAIN, 14); g.setFont(font); g.drawString("" + v, x + 6, y + 15); } this.k = v; } }; } }); // customize the renderer /*GradientVertexRenderer<Konzept,EdgeClass> vertex = new GradientVertexRenderer<Konzept,EdgeClass>(Color.white, Color.white, true); vv.getRenderer().setVertexRenderer(vertex); vv.getRenderer().setVertexLabelRenderer(vlasr); */ vv.setBackground(Color.white); // add a listener for ToolTips KonzeptParser<Konzept> parser = new KonzeptParser<Konzept>(); vv.setVertexToolTipTransformer(parser); /*final DefaultModalGraphMouse<Konzept,Edge> graphMouse = new DefaultModalGraphMouse<Konzept,Edge>(); */ Factory<Konzept> vertexFactory = new VertexFactory(); Factory<EdgeClass> edgeFactory = new EdgeFactory(); graphMouse = new MyModalGraphMouse<Konzept, EdgeClass>(vv.getRenderContext(), vertexFactory, edgeFactory, main, vv); vv.setGraphMouse(graphMouse); vv.addKeyListener(graphMouse.getModeKeyListener()); // the EditingGraphMouse will pass mouse event coordinates to the // vertexLocations function to set the locations of the vertices as // they are created // graphMouse.setVertexLocations(vertexLocations); vv.setGraphMouse(graphMouse); vv.addKeyListener(graphMouse.getModeKeyListener()); graphMouse.setMode(ModalGraphMouse.Mode.EDITING); GraphZoomScrollPane gzsp = new GraphZoomScrollPane(vv); JComboBox modeBox = graphMouse.getModeComboBox(); modeBox.addItemListener(graphMouse.getModeListener()); //graphMouse.setMode(ModalGraphMouse.Mode.TRANSFORMING); final ScalingControl scaler = new CrossoverScalingControl(); JButton plus = new JButton(); plus.setIcon(new ImageIcon(getClass().getResource("/thesaurusEditor/img/zoom_in.png"))); plus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scaler.scale(vv, 1.1f, vv.getCenter()); } }); JButton minus = new JButton(); minus.setIcon(new ImageIcon(getClass().getResource("/thesaurusEditor/img/zoom_out.png"))); minus.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scaler.scale(vv, 1 / 1.1f, vv.getCenter()); } }); JPanel controls = new JPanel(); JPanel zoomControls = new JPanel(new GridLayout(1, 2)); //zoomControls.setBorder(BorderFactory.createTitledBorder("Zoom")); zoomControls.add(plus); zoomControls.add(minus); controls.add(zoomControls); //controls.add(modeBox); /* javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(gzsp); gzsp.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 374, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 106, Short.MAX_VALUE) ); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(controls); controls.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 374, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 164, Short.MAX_VALUE) );*/ javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(gzsp, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(controls, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addContainerGap() .addComponent(gzsp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(controls, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); }
From source file:tubessister.KonsesusPaxos.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./* w ww .java 2 s. co m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLayeredPane1 = new javax.swing.JLayeredPane(); MenuAwal = new javax.swing.JPanel(); PlayGameButton = new javax.swing.JLabel(); LogoGame = new javax.swing.JLabel(); GamePlaySiang = new javax.swing.JPanel(); PlayGameButton1 = new javax.swing.JLabel(); username = new javax.swing.JLabel(); ServerAddress7 = new javax.swing.JLabel(); playrole = new javax.swing.JLabel(); username1 = new javax.swing.JLabel(); username2 = new javax.swing.JLabel(); LogoGame1 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox<>(); ServerAddress8 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); Register = new javax.swing.JPanel(); ServerAddress1 = new javax.swing.JLabel(); ServerAddress = new javax.swing.JLabel(); InsertServerAddress = new javax.swing.JTextField(); Port = new javax.swing.JLabel(); InsertPort = new javax.swing.JTextField(); Port1 = new javax.swing.JLabel(); InsertNickname = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); GagalLogin1 = new javax.swing.JPanel(); LoginFailedPanel1 = new javax.swing.JPanel(); LoginFailed1 = new javax.swing.JLabel(); LoginFailedButton1 = new javax.swing.JButton(); LoginFailed4 = new javax.swing.JLabel(); GagalLogin2 = new javax.swing.JPanel(); LoginFailedPanel2 = new javax.swing.JPanel(); LoginFailed2 = new javax.swing.JLabel(); LoginFailedButton2 = new javax.swing.JButton(); LoginFailed3 = new javax.swing.JLabel(); GamePlayMalam = new javax.swing.JPanel(); PlayGameButton2 = new javax.swing.JLabel(); ServerAddress3 = new javax.swing.JLabel(); StatusReady = new javax.swing.JPanel(); ServerAddress4 = new javax.swing.JLabel(); ServerAddress5 = new javax.swing.JLabel(); ServerID = new javax.swing.JLabel(); Port2 = new javax.swing.JLabel(); PortID = new javax.swing.JLabel(); Port3 = new javax.swing.JLabel(); NicknameID = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); Status = new javax.swing.JLabel(); StartGame = new javax.swing.JPanel(); PlayGameButton3 = new javax.swing.JLabel(); ServerAddress6 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLayeredPane1.setLayout(new javax.swing.OverlayLayout(jLayeredPane1)); MenuAwal.setBackground(new java.awt.Color(153, 204, 255)); MenuAwal.setMinimumSize(new java.awt.Dimension(960, 560)); PlayGameButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/playbutton.png"))); // NOI18N PlayGameButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { PlayGameButtonMousePressed(evt); } }); LogoGame.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/LogoGame.png"))); // NOI18N javax.swing.GroupLayout MenuAwalLayout = new javax.swing.GroupLayout(MenuAwal); MenuAwal.setLayout(MenuAwalLayout); MenuAwalLayout.setHorizontalGroup(MenuAwalLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MenuAwalLayout.createSequentialGroup().addContainerGap(405, Short.MAX_VALUE) .addGroup(MenuAwalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, MenuAwalLayout.createSequentialGroup().addComponent(LogoGame).addGap(339, 339, 339)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, MenuAwalLayout.createSequentialGroup().addComponent(PlayGameButton) .addGap(412, 412, 412))))); MenuAwalLayout.setVerticalGroup(MenuAwalLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(MenuAwalLayout.createSequentialGroup().addGap(48, 48, 48).addComponent(LogoGame) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 209, Short.MAX_VALUE) .addComponent(PlayGameButton).addGap(89, 89, 89))); jLayeredPane1.add(MenuAwal); GamePlaySiang.setBackground(new java.awt.Color(153, 204, 255)); PlayGameButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/sun (2).png"))); // NOI18N PlayGameButton1.setMaximumSize(new java.awt.Dimension(230, 230)); PlayGameButton1.setMinimumSize(new java.awt.Dimension(230, 230)); PlayGameButton1.setPreferredSize(new java.awt.Dimension(230, 239)); username.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N username.setText("username"); ServerAddress7.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N ServerAddress7.setText("Siang Hari"); playrole.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N playrole.setText("playrole"); username1.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N username1.setText("username"); username2.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N username2.setText("username"); LogoGame1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/LogoGame.png"))); // NOI18N jComboBox1.setModel( new javax.swing.DefaultComboBoxModel<>(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); ServerAddress8.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N ServerAddress8.setText("Player to Kill"); jButton3.setText("Vote"); jButton3.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { jButton3MousePressed(evt); } }); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); javax.swing.GroupLayout GamePlaySiangLayout = new javax.swing.GroupLayout(GamePlaySiang); GamePlaySiang.setLayout(GamePlaySiangLayout); GamePlaySiangLayout.setHorizontalGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, GamePlaySiangLayout.createSequentialGroup().addGap(0, 749, Short.MAX_VALUE).addComponent( LogoGame1, javax.swing.GroupLayout.PREFERRED_SIZE, 416, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(GamePlaySiangLayout.createSequentialGroup().addGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlaySiangLayout.createSequentialGroup().addGap(31, 31, 31) .addComponent(PlayGameButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlaySiangLayout.createSequentialGroup() .addComponent(ServerAddress8).addGap(92, 92, 92) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(ServerAddress7))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, GamePlaySiangLayout.createSequentialGroup().addGap(306, 306, 306).addComponent( jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(GamePlaySiangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(username).addComponent(username1)) .addGap(168, 168, 168) .addGroup(GamePlaySiangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(playrole).addComponent(username2)) .addGap(53, 53, 53))); GamePlaySiangLayout.setVerticalGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlaySiangLayout.createSequentialGroup() .addGroup(GamePlaySiangLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlaySiangLayout.createSequentialGroup().addGap(33, 33, 33) .addComponent(PlayGameButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(GamePlaySiangLayout.createSequentialGroup().addGap(47, 47, 47) .addGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ServerAddress7).addComponent(playrole) .addComponent(username)))) .addGap(67, 67, 67) .addGroup(GamePlaySiangLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(username1).addComponent(username2) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ServerAddress8)) .addGap(47, 47, 47) .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 197, Short.MAX_VALUE) .addComponent(LogoGame1))); jLayeredPane1.add(GamePlaySiang); Register.setBackground(new java.awt.Color(153, 204, 255)); ServerAddress1.setFont(new java.awt.Font("Verdana", 0, 48)); // NOI18N ServerAddress1.setText("Register"); ServerAddress.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N ServerAddress.setText("Server:"); InsertServerAddress.setFont(new java.awt.Font("Tw Cen MT Condensed Extra Bold", 0, 18)); // NOI18N InsertServerAddress.setHorizontalAlignment(javax.swing.JTextField.LEFT); InsertServerAddress.setToolTipText(""); InsertServerAddress.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { InsertServerAddressActionPerformed(evt); } }); Port.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N Port.setText("Port:"); InsertPort.setFont(new java.awt.Font("Tw Cen MT Condensed Extra Bold", 0, 18)); // NOI18N InsertPort.setHorizontalAlignment(javax.swing.JTextField.LEFT); InsertPort.setToolTipText(""); Port1.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N Port1.setText("Nickname:"); InsertNickname.setFont(new java.awt.Font("Tw Cen MT Condensed Extra Bold", 0, 18)); // NOI18N InsertNickname.setHorizontalAlignment(javax.swing.JTextField.LEFT); InsertNickname.setToolTipText(""); InsertNickname.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { InsertNicknameActionPerformed(evt); } }); jButton1.setText("Join Game"); jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { jButton1MousePressed(evt); } }); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout RegisterLayout = new javax.swing.GroupLayout(Register); Register.setLayout(RegisterLayout); RegisterLayout.setHorizontalGroup(RegisterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, RegisterLayout.createSequentialGroup() .addContainerGap(423, Short.MAX_VALUE) .addGroup(RegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, RegisterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(InsertNickname, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(RegisterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(RegisterLayout.createSequentialGroup().addComponent(Port1) .addGap(229, 229, 229)) .addGroup(RegisterLayout.createSequentialGroup() .addGroup(RegisterLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ServerAddress).addComponent(Port)) .addGap(88, 88, 88) .addGroup(RegisterLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(InsertServerAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(InsertPort, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGroup(RegisterLayout.createSequentialGroup().addGroup(RegisterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(RegisterLayout.createSequentialGroup().addGap(73, 73, 73) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(RegisterLayout.createSequentialGroup().addGap(39, 39, 39) .addComponent(ServerAddress1))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 57, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(418, 418, 418))); RegisterLayout.setVerticalGroup(RegisterLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(RegisterLayout.createSequentialGroup().addGap(92, 92, 92).addComponent(ServerAddress1) .addGap(40, 40, 40) .addGroup(RegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(InsertServerAddress, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ServerAddress)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addGroup(RegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(InsertPort, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Port)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE) .addGroup(RegisterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(InsertNickname, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Port1)) .addGap(38, 38, 38).addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(238, 238, 238))); jLayeredPane1.add(Register); GagalLogin1.setBackground(new java.awt.Color(153, 204, 255)); GagalLogin1.setForeground(new java.awt.Color(153, 204, 255)); GagalLogin1.setMinimumSize(new java.awt.Dimension(960, 560)); GagalLogin1.setOpaque(false); LoginFailedPanel1.setBackground(new java.awt.Color(204, 255, 255)); LoginFailed1.setFont(new java.awt.Font("Prestige Elite Std", 1, 18)); // NOI18N LoginFailed1.setText("Gagal Register :"); LoginFailedButton1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N LoginFailedButton1.setText("OK"); LoginFailedButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LoginFailedButton1ActionPerformed(evt); } }); LoginFailed4.setFont(new java.awt.Font("Prestige Elite Std", 1, 18)); // NOI18N LoginFailed4.setText("IP Address atau Port Salah"); javax.swing.GroupLayout LoginFailedPanel1Layout = new javax.swing.GroupLayout(LoginFailedPanel1); LoginFailedPanel1.setLayout(LoginFailedPanel1Layout); LoginFailedPanel1Layout.setHorizontalGroup( LoginFailedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LoginFailedPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(LoginFailedButton1).addGap(48, 48, 48)) .addGroup(LoginFailedPanel1Layout.createSequentialGroup() .addGroup(LoginFailedPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(LoginFailedPanel1Layout.createSequentialGroup() .addGap(166, 166, 166).addComponent(LoginFailed1)) .addGroup(LoginFailedPanel1Layout.createSequentialGroup() .addGap(122, 122, 122).addComponent(LoginFailed4))) .addContainerGap(139, Short.MAX_VALUE))); LoginFailedPanel1Layout.setVerticalGroup(LoginFailedPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(LoginFailedPanel1Layout.createSequentialGroup().addContainerGap(58, Short.MAX_VALUE) .addComponent(LoginFailed1).addGap(37, 37, 37).addComponent(LoginFailed4).addGap(37, 37, 37) .addComponent(LoginFailedButton1).addGap(27, 27, 27))); javax.swing.GroupLayout GagalLogin1Layout = new javax.swing.GroupLayout(GagalLogin1); GagalLogin1.setLayout(GagalLogin1Layout); GagalLogin1Layout.setHorizontalGroup(GagalLogin1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GagalLogin1Layout.createSequentialGroup().addGap(302, 302, 302) .addComponent(LoginFailedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(341, Short.MAX_VALUE))); GagalLogin1Layout.setVerticalGroup(GagalLogin1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, GagalLogin1Layout.createSequentialGroup() .addContainerGap(228, Short.MAX_VALUE) .addComponent(LoginFailedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(191, 191, 191))); jLayeredPane1.add(GagalLogin1); GagalLogin2.setMinimumSize(new java.awt.Dimension(960, 560)); GagalLogin2.setOpaque(false); LoginFailedPanel2.setBackground(new java.awt.Color(204, 255, 255)); LoginFailed2.setFont(new java.awt.Font("Prestige Elite Std", 1, 18)); // NOI18N LoginFailed2.setText("Gagal Register: "); LoginFailedButton2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N LoginFailedButton2.setText("OK"); LoginFailedButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { LoginFailedButton2ActionPerformed(evt); } }); LoginFailed3.setFont(new java.awt.Font("Prestige Elite Std", 1, 18)); // NOI18N LoginFailed3.setText("Nickname Sudah Digunakan"); javax.swing.GroupLayout LoginFailedPanel2Layout = new javax.swing.GroupLayout(LoginFailedPanel2); LoginFailedPanel2.setLayout(LoginFailedPanel2Layout); LoginFailedPanel2Layout.setHorizontalGroup( LoginFailedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(LoginFailedPanel2Layout.createSequentialGroup().addGap(152, 152, 152) .addComponent(LoginFailed2).addGap(0, 0, Short.MAX_VALUE)) .addGroup(LoginFailedPanel2Layout.createSequentialGroup().addGap(94, 94, 94) .addComponent(LoginFailed3).addContainerGap(116, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, LoginFailedPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(LoginFailedButton2).addGap(47, 47, 47))); LoginFailedPanel2Layout.setVerticalGroup( LoginFailedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(LoginFailedPanel2Layout.createSequentialGroup() .addContainerGap(69, Short.MAX_VALUE).addComponent(LoginFailed2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(LoginFailed3).addGap(60, 60, 60).addComponent(LoginFailedButton2) .addContainerGap())); javax.swing.GroupLayout GagalLogin2Layout = new javax.swing.GroupLayout(GagalLogin2); GagalLogin2.setLayout(GagalLogin2Layout); GagalLogin2Layout.setHorizontalGroup(GagalLogin2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GagalLogin2Layout.createSequentialGroup().addGap(339, 339, 339) .addComponent(LoginFailedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(342, Short.MAX_VALUE))); GagalLogin2Layout.setVerticalGroup(GagalLogin2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, GagalLogin2Layout.createSequentialGroup() .addContainerGap(221, Short.MAX_VALUE) .addComponent(LoginFailedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(206, 206, 206))); jLayeredPane1.add(GagalLogin2); GamePlayMalam.setBackground(new java.awt.Color(153, 204, 255)); PlayGameButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/moon (1).png"))); // NOI18N PlayGameButton2.setMaximumSize(new java.awt.Dimension(230, 230)); PlayGameButton2.setMinimumSize(new java.awt.Dimension(230, 230)); PlayGameButton2.setPreferredSize(new java.awt.Dimension(230, 239)); ServerAddress3.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N ServerAddress3.setText("Malam Hari"); javax.swing.GroupLayout GamePlayMalamLayout = new javax.swing.GroupLayout(GamePlayMalam); GamePlayMalam.setLayout(GamePlayMalamLayout); GamePlayMalamLayout.setHorizontalGroup( GamePlayMalamLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlayMalamLayout.createSequentialGroup().addGap(31, 31, 31) .addComponent(PlayGameButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(ServerAddress3) .addContainerGap(980, Short.MAX_VALUE))); GamePlayMalamLayout.setVerticalGroup(GamePlayMalamLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlayMalamLayout.createSequentialGroup() .addGroup(GamePlayMalamLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(GamePlayMalamLayout.createSequentialGroup().addGap(33, 33, 33) .addComponent(PlayGameButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(GamePlayMalamLayout.createSequentialGroup().addGap(47, 47, 47) .addComponent(ServerAddress3))) .addContainerGap(571, Short.MAX_VALUE))); jLayeredPane1.add(GamePlayMalam); StatusReady.setBackground(new java.awt.Color(153, 204, 255)); ServerAddress4.setFont(new java.awt.Font("Verdana", 0, 48)); // NOI18N ServerAddress4.setText("Register Succesfully With"); ServerAddress5.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N ServerAddress5.setText("Server:"); ServerID.setFont(new java.awt.Font("Tempus Sans ITC", 0, 24)); // NOI18N ServerID.setText("server"); Port2.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N Port2.setText("Port:"); PortID.setFont(new java.awt.Font("Tempus Sans ITC", 0, 24)); // NOI18N PortID.setText("port"); Port3.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N Port3.setText("Nickname:"); NicknameID.setFont(new java.awt.Font("Tempus Sans ITC", 0, 24)); // NOI18N NicknameID.setText("nickname"); jButton2.setText("Ready Game to Start"); jButton2.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { jButton2MousePressed(evt); } }); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); Status.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N Status.setText("After you click ready game, wait until 6 player ready to play the game"); javax.swing.GroupLayout StatusReadyLayout = new javax.swing.GroupLayout(StatusReady); StatusReady.setLayout(StatusReadyLayout); StatusReadyLayout.setHorizontalGroup(StatusReadyLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(StatusReadyLayout.createSequentialGroup().addGroup(StatusReadyLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(StatusReadyLayout.createSequentialGroup().addGap(454, 454, 454).addComponent( jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(StatusReadyLayout.createSequentialGroup().addGap(420, 420, 420) .addGroup(StatusReadyLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ServerAddress5).addComponent(Port2).addComponent(Port3)) .addGap(69, 69, 69) .addGroup(StatusReadyLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ServerID).addComponent(PortID).addComponent(NicknameID))) .addGroup(StatusReadyLayout.createSequentialGroup().addGap(241, 241, 241) .addComponent(ServerAddress4)) .addGroup(StatusReadyLayout.createSequentialGroup().addGap(314, 314, 314) .addComponent(Status))) .addContainerGap(285, Short.MAX_VALUE))); StatusReadyLayout.setVerticalGroup(StatusReadyLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(StatusReadyLayout.createSequentialGroup().addGap(186, 186, 186) .addComponent(ServerAddress4).addGap(34, 34, 34) .addGroup(StatusReadyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ServerAddress5).addComponent(ServerID)) .addGap(18, 18, 18) .addGroup(StatusReadyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Port2).addComponent(PortID)) .addGap(18, 18, 18) .addGroup(StatusReadyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(NicknameID).addComponent(Port3)) .addGap(18, 18, 18) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34).addComponent(Status).addContainerGap(150, Short.MAX_VALUE))); jLayeredPane1.add(StatusReady); StartGame.setBackground(new java.awt.Color(153, 204, 255)); PlayGameButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/tubessister/rotate.png"))); // NOI18N PlayGameButton3.setMaximumSize(new java.awt.Dimension(230, 230)); PlayGameButton3.setMinimumSize(new java.awt.Dimension(230, 230)); PlayGameButton3.setPreferredSize(new java.awt.Dimension(230, 239)); ServerAddress6.setFont(new java.awt.Font("Verdana", 0, 14)); // NOI18N ServerAddress6.setText("Initializing the game wait until at least 6 player ready to play the game"); javax.swing.GroupLayout StartGameLayout = new javax.swing.GroupLayout(StartGame); StartGame.setLayout(StartGameLayout); StartGameLayout .setHorizontalGroup(StartGameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, StartGameLayout.createSequentialGroup().addContainerGap(322, Short.MAX_VALUE) .addComponent(ServerAddress6).addGap(319, 319, 319)) .addGroup(StartGameLayout.createSequentialGroup().addGap(541, 541, 541) .addComponent(PlayGameButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); StartGameLayout.setVerticalGroup(StartGameLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(StartGameLayout.createSequentialGroup().addGap(325, 325, 325) .addComponent(PlayGameButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(ServerAddress6, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(235, Short.MAX_VALUE))); jLayeredPane1.add(StartGame); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 1135, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout .createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 560, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(layout .createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)))); pack(); }
From source file:ueg.watchdog.view.PersonDetection.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./*ww w .ja va 2 s . c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanelDetectPerson = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jButtonCapture = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); javax.swing.GroupLayout jPanelDetectPersonLayout = new javax.swing.GroupLayout(jPanelDetectPerson); jPanelDetectPerson.setLayout(jPanelDetectPersonLayout); jPanelDetectPersonLayout.setHorizontalGroup(jPanelDetectPersonLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 594, Short.MAX_VALUE)); jPanelDetectPersonLayout.setVerticalGroup(jPanelDetectPersonLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 355, Short.MAX_VALUE)); jLabel1.setFont(new java.awt.Font("DejaVu Serif", 1, 18)); // NOI18N jLabel1.setText("WatchDog - Detect Person"); jButtonCapture.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButtonCapture.setText("Capture"); jButtonCapture.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonCaptureActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(36, 36, 36) .addComponent(jPanelDetectPerson, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(41, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(187, 187, 187)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButtonCapture, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(252, 252, 252))))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelDetectPerson, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28).addComponent(jButtonCapture, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(15, Short.MAX_VALUE))); pack(); }
From source file:ueg.watchdog.view.Report.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./* www . ja v a 2 s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jButtonPrint = new javax.swing.JButton(); birthdayValidatorLabel = new javax.swing.JLabel(); jDateChooserFrom = new com.toedter.calendar.JDateChooser(); jDateChooserTo = new com.toedter.calendar.JDateChooser(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setResizable(false); jLabel1.setFont(new java.awt.Font("DejaVu Serif", 1, 18)); // NOI18N jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setText("WatchDog - Report"); jLabel2.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jLabel2.setText("Report Generation Period"); jLabel3.setText("Date (From) : "); jLabel4.setText("Date (To) : "); jLabel5.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButtonPrint.setFont(new java.awt.Font("Dialog", 1, 14)); // NOI18N jButtonPrint.setText("Print Report"); jButtonPrint.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPrintActionPerformed(evt); } }); jDateChooserFrom.setDateFormatString("yyyy-MM-dd"); jDateChooserTo.setDateFormatString("yyyy-MM-dd"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(104, 104, 104).addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(56, 56, 56).addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addGroup(layout.createSequentialGroup().addGap(124, 124, 124) .addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 128, Short.MAX_VALUE) .addComponent(jButtonPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))))) .addGap(52, 52, 52)) .addGroup(layout.createSequentialGroup().addGap(92, 92, 92) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jDateChooserFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jDateChooserTo, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(26, 26, 26) .addComponent(birthdayValidatorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(35, 35, 35))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(21, 21, 21).addComponent(jLabel1).addGap(18, 18, 18) .addComponent(jLabel2).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel3).addComponent(jDateChooserFrom, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jDateChooserTo, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(32, 32, 32).addComponent(birthdayValidatorLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonPrint, javax.swing.GroupLayout.DEFAULT_SIZE, 49, Short.MAX_VALUE) .addGap(54, 54, 54))); pack(); }
From source file:uk.ac.ebi.pride.tools.converter.gui.dialogs.SimplePTMDialog.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license cancelButton = new JButton(); okButton = new JButton(); scrollPane1 = new JScrollPane(); ptmList = new JList(); label1 = new JLabel(); label2 = new JLabel(); massDeltaTextField = new JTextField(); ptmLabelTextField = new JTextField(); label3 = new JLabel(); olsButton = new JButton(); //======== this ======== setTitle("PTM Assignment"); Container contentPane = getContentPane(); //---- cancelButton ---- cancelButton.setText("Cancel"); cancelButton.addActionListener(new ActionListener() { @Override/*from w w w . ja va 2 s . co m*/ public void actionPerformed(ActionEvent e) { cancelButtonActionPerformed(); } }); //---- okButton ---- okButton.setText("OK"); okButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { okButtonActionPerformed(); } }); //======== scrollPane1 ======== { //---- ptmList ---- ptmList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); ptmList.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { ptmListMouseClicked(e); } }); scrollPane1.setViewportView(ptmList); } //---- label1 ---- label1.setText("Label"); //---- label2 ---- label2.setText("Mass Delta"); //---- massDeltaTextField ---- massDeltaTextField.setEditable(false); //---- ptmLabelTextField ---- ptmLabelTextField.setEditable(false); //---- label3 ---- label3.setText("Suggested PTMs:"); //---- olsButton ---- olsButton.setText("Search OLS"); olsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { olsButtonActionPerformed(); } }); GroupLayout contentPaneLayout = new GroupLayout(contentPane); contentPane.setLayout(contentPaneLayout); contentPaneLayout.setHorizontalGroup(contentPaneLayout.createParallelGroup().addGroup( GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup().addContainerGap().addGroup(contentPaneLayout .createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(scrollPane1, GroupLayout.Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 376, Short.MAX_VALUE) .addGroup(contentPaneLayout.createSequentialGroup().addComponent(olsButton) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 94, Short.MAX_VALUE) .addComponent(okButton, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(cancelButton)) .addGroup(GroupLayout.Alignment.LEADING, contentPaneLayout.createSequentialGroup() .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(label1).addComponent(label2)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(contentPaneLayout.createParallelGroup() .addComponent(ptmLabelTextField, GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE) .addComponent(massDeltaTextField, GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE))) .addComponent(label3, GroupLayout.Alignment.LEADING)).addContainerGap())); contentPaneLayout.setVerticalGroup(contentPaneLayout.createParallelGroup().addGroup( GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup().addContainerGap() .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(ptmLabelTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(label1)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(label2).addComponent(massDeltaTextField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED).addComponent(label3) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(scrollPane1, GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(cancelButton).addComponent(okButton).addComponent(olsButton)) .addContainerGap())); pack(); setLocationRelativeTo(getOwner()); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:uk.chromis.pos.config.JPanelConfiguration.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.//w w w . ja v a 2 s . c o m */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane1 = new javax.swing.JTabbedPane(); jPanelDatabase = new javax.swing.JPanel(); jPanelGeneral = new javax.swing.JPanel(); jPanelLocale = new javax.swing.JPanel(); jPanelPayment = new javax.swing.JPanel(); jPanelPeripheral = new javax.swing.JPanel(); jPanelSystem = new javax.swing.JPanel(); jPanelTicketSetup = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); jbtnRestore = new javax.swing.JButton(); jbtnExit = new javax.swing.JButton(); jbtnSave = new javax.swing.JButton(); setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N setMinimumSize(new java.awt.Dimension(780, 700)); setPreferredSize(new java.awt.Dimension(780, 700)); jTabbedPane1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jTabbedPane1.setPreferredSize(new java.awt.Dimension(730, 650)); jPanelDatabase.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelDatabase.setPreferredSize(new java.awt.Dimension(0, 450)); jPanelDatabase.setLayout(new javax.swing.BoxLayout(jPanelDatabase, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("Database Setup", jPanelDatabase); jPanelGeneral.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelGeneral.setPreferredSize(new java.awt.Dimension(0, 400)); jPanelGeneral.setLayout(new javax.swing.BoxLayout(jPanelGeneral, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("General", jPanelGeneral); jPanelLocale.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelLocale.setPreferredSize(new java.awt.Dimension(730, 400)); jPanelLocale.setLayout(new javax.swing.BoxLayout(jPanelLocale, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("Locale", jPanelLocale); jPanelPayment.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelPayment.setPreferredSize(new java.awt.Dimension(0, 400)); jPanelPayment.setLayout(new javax.swing.BoxLayout(jPanelPayment, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("Payment Method", jPanelPayment); jPanelPeripheral.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelPeripheral.setPreferredSize(new java.awt.Dimension(0, 400)); jPanelPeripheral.setLayout(new javax.swing.BoxLayout(jPanelPeripheral, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("Peripherals", jPanelPeripheral); jPanelSystem.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelSystem.setPreferredSize(new java.awt.Dimension(0, 500)); jPanelSystem.setLayout(new javax.swing.BoxLayout(jPanelSystem, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("System Options", jPanelSystem); jPanelTicketSetup.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jPanelTicketSetup.setPreferredSize(new java.awt.Dimension(0, 400)); jPanelTicketSetup.setLayout(new javax.swing.BoxLayout(jPanelTicketSetup, javax.swing.BoxLayout.LINE_AXIS)); jTabbedPane1.addTab("Ticket Setup", jPanelTicketSetup); jbtnRestore.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jbtnRestore.setText(AppLocal.getIntString("Button.Factory")); // NOI18N jbtnRestore.setMaximumSize(new java.awt.Dimension(103, 33)); jbtnRestore.setMinimumSize(new java.awt.Dimension(103, 33)); jbtnRestore.setPreferredSize(new java.awt.Dimension(80, 33)); jbtnRestore.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnRestoreActionPerformed(evt); } }); jbtnExit.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jbtnExit.setText(AppLocal.getIntString("Button.Exit")); // NOI18N jbtnExit.setMaximumSize(new java.awt.Dimension(70, 33)); jbtnExit.setMinimumSize(new java.awt.Dimension(70, 33)); jbtnExit.setPreferredSize(new java.awt.Dimension(80, 33)); jbtnExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnExitActionPerformed(evt); } }); jbtnSave.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N jbtnSave.setText(AppLocal.getIntString("Button.Save")); // NOI18N jbtnSave.setMaximumSize(new java.awt.Dimension(70, 33)); jbtnSave.setMinimumSize(new java.awt.Dimension(70, 33)); jbtnSave.setPreferredSize(new java.awt.Dimension(80, 33)); jbtnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jbtnSaveActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout .setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanel1Layout.createSequentialGroup().addContainerGap() .addComponent(jbtnRestore, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(230, 230, 230) .addComponent(jbtnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 250, Short.MAX_VALUE) .addComponent(jbtnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jbtnRestore, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jbtnExit, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jbtnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE))); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(37, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 645, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); }
From source file:wsattacker.sso.openid.attacker.gui.MainGui.java
/** * This method is called from within the constructor to * initialize the form./* w w w. ja va 2s. com*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { bindingGroup = new BindingGroup(); saveFileChooser = new JFileChooser(); loadFileChooser = new JFileChooser(); xmlFileFilter = new XmlFileFilter(); controller = new ServerController(); serverStatusToIconConverter = new ServerStatusToIconConverter(); splitPane = new JSplitPane(); jXTaskPaneContainer1 = new JXTaskPaneContainer(); attackerIdpTaskPane = new JXTaskPane(); analyzerIdpTaskPane = new JXTaskPane(); evaluationTaskPane = new JXTaskPane(); logTaskPane = new JXTaskPane(); menuBar = new JMenuBar(); fileMenu = new JMenu(); saveItem = new JMenuItem(); loadItem = new JMenuItem(); jSeparator2 = new JPopupMenu.Separator(); clearLogMenuItem = new JMenuItem(); jSeparator1 = new JPopupMenu.Separator(); exitNoConfigSave = new JMenuItem(); exitAndSaveConfig = new JMenuItem(); saveFileChooser.setDialogType(JFileChooser.SAVE_DIALOG); saveFileChooser.setFileFilter(xmlFileFilter); loadFileChooser.setFileFilter(xmlFileFilter); loadFileChooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); addWindowListener(new WindowAdapter() { public void windowOpened(WindowEvent evt) { formWindowOpened(evt); } public void windowClosing(WindowEvent evt) { formWindowClosing(evt); } }); splitPane.setBorder(null); splitPane.setDividerLocation(200); splitPane.setDividerSize(0); jXTaskPaneContainer1.setMinimumSize(new Dimension(200, 259)); jXTaskPaneContainer1.setPreferredSize(new Dimension(200, 10)); VerticalLayout verticalLayout1 = new VerticalLayout(); verticalLayout1.setGap(14); jXTaskPaneContainer1.setLayout(verticalLayout1); attackerIdpTaskPane.setFocusable(false); attackerIdpTaskPane.setTitle("Attacker IdP"); Binding binding = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ_WRITE, controller, ELProperty.create("${attackerServer.status}"), attackerIdpTaskPane, BeanProperty.create("icon")); binding.setConverter(serverStatusToIconConverter); bindingGroup.addBinding(binding); jXTaskPaneContainer1.add(attackerIdpTaskPane); analyzerIdpTaskPane.setFocusable(false); analyzerIdpTaskPane.setTitle("Analyzer IdP"); binding = Bindings.createAutoBinding(AutoBinding.UpdateStrategy.READ_WRITE, controller, ELProperty.create("${analyzerServer.status}"), analyzerIdpTaskPane, BeanProperty.create("icon")); binding.setConverter(serverStatusToIconConverter); bindingGroup.addBinding(binding); jXTaskPaneContainer1.add(analyzerIdpTaskPane); evaluationTaskPane.setFocusable(false); evaluationTaskPane.setTitle("Evaluation"); jXTaskPaneContainer1.add(evaluationTaskPane); logTaskPane.setFocusable(false); logTaskPane.setTitle("Other"); jXTaskPaneContainer1.add(logTaskPane); splitPane.setLeftComponent(jXTaskPaneContainer1); fileMenu.setMnemonic('F'); fileMenu.setText("File"); saveItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.ALT_MASK)); saveItem.setText("Save Config"); saveItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { saveItemActionPerformed(evt); } }); fileMenu.add(saveItem); loadItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_L, InputEvent.ALT_MASK)); loadItem.setText("Load Config"); loadItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { loadItemActionPerformed(evt); } }); fileMenu.add(loadItem); fileMenu.add(jSeparator2); clearLogMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_MASK)); clearLogMenuItem.setText("Clear Log"); clearLogMenuItem.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { clearLogMenuItemActionPerformed(evt); } }); fileMenu.add(clearLogMenuItem); fileMenu.add(jSeparator1); exitNoConfigSave.setText("Exit (without saving config)"); exitNoConfigSave.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { exitNoConfigSaveActionPerformed(evt); } }); fileMenu.add(exitNoConfigSave); exitAndSaveConfig.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, InputEvent.META_MASK)); exitAndSaveConfig.setText("Exit"); exitAndSaveConfig.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { exitAndSaveConfigActionPerformed(evt); } }); fileMenu.add(exitAndSaveConfig); menuBar.add(fileMenu); setJMenuBar(menuBar); GroupLayout layout = new GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(splitPane, GroupLayout.DEFAULT_SIZE, 960, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING).addComponent(splitPane, GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE)); bindingGroup.bind(); pack(); }