List of usage examples for javax.swing WindowConstants EXIT_ON_CLOSE
int EXIT_ON_CLOSE
To view the source code for javax.swing WindowConstants EXIT_ON_CLOSE.
Click Source Link
From source file:spacetrader.demos.M5Demo.java
public static void main(String[] args) { // EllipticalGalaxy test GalaxyGenerator gaxGen = new EllipticalGalaxyGenerator("Fartdust", SYSTEM_NUM_MEAN, SYSTEM_NUM_SD, X_SD, Y_SD, BOUND_FACTOR * X_SD, BOUND_FACTOR * Y_SD, Util.sampleFromUniformReal(0, Math.PI)); gax = gaxGen.generate();//from w w w .j a v a 2 s . c om List<StarSystem> systems = gax.getSystems(); StarSystem t1 = systems.get(0); StarSystem t2 = systems.get(1); FactionSelector f1 = new FactionSelector(new Faction.Test1Heurstic(), Faction.Test1); f1.addNeighbor(t1); FactionSelector f2 = new FactionSelector(new Faction.Test1Heurstic(), Faction.Test2); f2.addNeighbor(t2); do { f1.update(); f2.update(); } while (!f1.isDone() && !f2.isDone()); JFrame frame = new JFrame(); frame.setVisible(true); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.setTitle("WAT"); frame.setSize((int) (FRAME_SIZE), (int) (FRAME_SIZE)); frame.add(new M4Demo()); }
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.//w w w.j av a 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: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.//from www .j av a2 s .c o 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.//from w w w.j ava2 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.// w w w. j av a 2 s . c om */ @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.chromis.pos.forms.JRootApp.java
private void poweredbyMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_poweredbyMouseClicked JFrame sampleFrame = new JFrame(); final Action exit = new AbstractAction("Exit") { @Override/*from w w w . j av a2 s . c o m*/ public final void actionPerformed(final ActionEvent e) { sampleFrame.setVisible(false); sampleFrame.dispose(); } }; String currentPath = null; if (OSValidator.isMac()) { try { currentPath = new File( JRootApp.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()) .toString(); } catch (URISyntaxException ex) { } } else { currentPath = System.getProperty("user.dir") + "\\chromispos.jar"; } String md5 = null; try { FileInputStream fis = new FileInputStream(new File(currentPath)); md5 = org.apache.commons.codec.digest.DigestUtils.md5Hex(fis); fis.close(); } catch (FileNotFoundException ex) { Logger.getLogger(JRootApp.class.getName()).log(Level.SEVERE, null, ex); } catch (IOException ex) { Logger.getLogger(JRootApp.class.getName()).log(Level.SEVERE, null, ex); } /* int mb = 1024*1024; //Getting the runtime reference from system Runtime runtime = Runtime.getRuntime(); System.out.println("##### Heap utilization statistics [MB] #####"); //Print used memory System.out.println("Used Memory:" + (runtime.totalMemory() - runtime.freeMemory()) / mb); //Print free memory System.out.println("Free Memory:" + runtime.freeMemory() / mb); //Print total available memory System.out.println("Total Memory:" + runtime.totalMemory() / mb); //Print Maximum available memory System.out.println("Max Memory:" + runtime.maxMemory() / mb); */ AboutDialog dialog = new AboutDialog(); JPanel dialogPanel = new JPanel(); MigLayout layout = new MigLayout("", "[fill]"); DefaultTableModel model = new DefaultTableModel(); JTable table = new JTable(model); model.addColumn("Details"); model.addColumn("Value"); model.addRow(new Object[] { "Database Version", readDataBaseVersion() }); model.addRow(new Object[] { "Java Version", System.getProperty("java.version") }); model.addRow(new Object[] { "Jar MD5", md5 }); model.addRow(new Object[] { "Operating System", System.getProperty("os.name") }); model.addRow(new Object[] { "Sync library", Sync.getVersion() }); JScrollPane scrollPane = new JScrollPane(table); JPanel mainPanel = new JPanel(layout); JLabel label = new JLabel(); JPanel btnPanel = new JPanel(); dialogPanel.add(dialog); mainPanel.add(dialogPanel, "wrap"); mainPanel.add(scrollPane, "wrap"); JButton btnExit = new JButton(exit); btnPanel.add(btnExit, "width 100!"); mainPanel.add(btnPanel, "right, wrap"); mainPanel.add(new JLabel(), "wrap"); sampleFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); sampleFrame.setPreferredSize(new Dimension(500, 300)); Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); sampleFrame.setLocation(dim.width / 2 - 250, dim.height / 2 - 150); sampleFrame.setUndecorated(true); mainPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 4)); sampleFrame.add(mainPanel); sampleFrame.pack(); sampleFrame.setVisible(true); }
From source file:uk.sipperfly.ui.Exactly.java
/** * This method is called from within the constructor to initialize the form. * WARNING:/*from w w w.j a v a 2 s .c o m*/ * 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() { jInternalFrame1 = new javax.swing.JInternalFrame(); about = new javax.swing.JDialog(); aboutPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane6 = new javax.swing.JScrollPane(); aboutArea = new javax.swing.JEditorPane(); jButton6 = new javax.swing.JButton(); jButton10 = new javax.swing.JButton(); jButton12 = new javax.swing.JButton(); authorPanel = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); jScrollPane7 = new javax.swing.JScrollPane(); authorArea = new javax.swing.JEditorPane(); contactPanel = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jScrollPane8 = new javax.swing.JScrollPane(); contactArea = new javax.swing.JEditorPane(); warning = new javax.swing.JDialog(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jButton13 = new javax.swing.JButton(); jButton14 = new javax.swing.JButton(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel5 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); jLabel49 = new javax.swing.JLabel(); editInputDir1 = new javax.swing.JTextField(); btnDirChoose1 = new javax.swing.JButton(); serializeBag = new javax.swing.JCheckBox(); jProgressBar2 = new javax.swing.JProgressBar(); jPanel11 = new javax.swing.JPanel(); jButton9 = new javax.swing.JButton(); jPanel10 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); enableBagFields = new javax.swing.JCheckBox(); jButton3 = new javax.swing.JButton(); addFieldsButton = new javax.swing.JButton(); hideTransfer = new javax.swing.JLabel(); show = new javax.swing.JLabel(); hide = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); showTransfer = new javax.swing.JLabel(); jLabel47 = new javax.swing.JLabel(); bagNameField = new javax.swing.JTextField(); editInputDir = new javax.swing.JTextField(); btnDirChoose = new javax.swing.JButton(); jLabel48 = new javax.swing.JLabel(); ftpDelivery = new javax.swing.JCheckBox(); jButton11 = new javax.swing.JButton(); jPanel8 = new javax.swing.JPanel(); note = new javax.swing.JLabel(); jPanel4 = new javax.swing.JPanel(); jLabel33 = new javax.swing.JLabel(); inputLocationDir = new javax.swing.JTextField(); chooseDir = new javax.swing.JButton(); validBagit = new javax.swing.JButton(); unBag = new javax.swing.JButton(); jLabel34 = new javax.swing.JLabel(); destDirLocation = new javax.swing.JTextField(); chooseDestDir = new javax.swing.JButton(); unBaggingProgress = new javax.swing.JProgressBar(); jScrollPane1 = new javax.swing.JScrollPane(); editCurrentStatus = new javax.swing.JTextArea(); clearLog = new javax.swing.JButton(); jPanel9 = new javax.swing.JPanel(); jLabel39 = new javax.swing.JLabel(); jLabel40 = new javax.swing.JLabel(); jLabel41 = new javax.swing.JLabel(); jLabel42 = new javax.swing.JLabel(); mailServerField = new javax.swing.JTextField(); userNameField = new javax.swing.JTextField(); passwordField = new javax.swing.JPasswordField(); jLabel43 = new javax.swing.JLabel(); saveBtn = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); serverPort = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); sslProtocol = new javax.swing.JCheckBox(); tlsProtocol = new javax.swing.JCheckBox(); noneProtocol = new javax.swing.JCheckBox(); emailNotifications = new javax.swing.JCheckBox(); jPanel3 = new javax.swing.JPanel(); jLabel11 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); ftpHost = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); jLabel17 = new javax.swing.JLabel(); activeMode = new javax.swing.JRadioButton(); passiveMode = new javax.swing.JRadioButton(); ftpPort = new javax.swing.JTextField(); ftpUser = new javax.swing.JTextField(); jButton7 = new javax.swing.JButton(); jButton8 = new javax.swing.JButton(); ftpPass = new javax.swing.JPasswordField(); jLabel18 = new javax.swing.JLabel(); ftpDestination = new javax.swing.JTextField(); jScrollPane2 = new javax.swing.JScrollPane(); jPanel7 = new javax.swing.JPanel(); jLabel35 = new javax.swing.JLabel(); jLabel36 = new javax.swing.JLabel(); saveEmailBtn = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel(); jScrollPane4 = new javax.swing.JScrollPane(); currentTemplate = new javax.swing.JTextArea(); clearTempButton = new javax.swing.JButton(); jPanel6 = new javax.swing.JPanel(); btnTransferFiles = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); jMenu4 = new javax.swing.JMenu(); export = new javax.swing.JMenuItem(); importXml = new javax.swing.JMenuItem(); jMenuItem1 = new javax.swing.JMenuItem(); quit = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); emailNotification = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); emailSetting = new javax.swing.JMenuItem(); ftpSettings = new javax.swing.JMenuItem(); jInternalFrame1.setVisible(true); javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout( jInternalFrame1.getContentPane()); jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout); jInternalFrame1Layout.setHorizontalGroup(jInternalFrame1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 6, Short.MAX_VALUE)); jInternalFrame1Layout.setVerticalGroup(jInternalFrame1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 4, Short.MAX_VALUE)); about.setTitle("About"); about.setMinimumSize(new java.awt.Dimension(700, 535)); about.setName("About"); // NOI18N about.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { aboutPropertyChange(evt); } }); jLabel1.setBackground(new java.awt.Color(255, 255, 255)); jLabel1.setFont(new java.awt.Font("Verdana", 1, 13)); // NOI18N jLabel1.setText("Description"); jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 102))); aboutArea.setMinimumSize(new java.awt.Dimension(106, 150)); aboutArea.setPreferredSize(new java.awt.Dimension(106, 150)); aboutArea.addHyperlinkListener(new javax.swing.event.HyperlinkListener() { public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { aboutAreaHyperlinkUpdate(evt); } }); aboutArea.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { aboutAreaPropertyChange(evt); } }); jScrollPane6.setViewportView(aboutArea); javax.swing.GroupLayout aboutPanelLayout = new javax.swing.GroupLayout(aboutPanel); aboutPanel.setLayout(aboutPanelLayout); aboutPanelLayout.setHorizontalGroup(aboutPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, aboutPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(aboutPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 484, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); aboutPanelLayout .setVerticalGroup(aboutPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(aboutPanelLayout.createSequentialGroup().addGap(18, 18, 18) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane6).addContainerGap())); jButton6.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton6.setText("About"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); jButton10.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N jButton10.setText("Author and License"); jButton10.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton10ActionPerformed(evt); } }); jButton12.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton12.setText("Contact"); jButton12.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton12ActionPerformed(evt); } }); authorPanel.setMinimumSize(new java.awt.Dimension(517, 445)); authorPanel.setPreferredSize(new java.awt.Dimension(517, 445)); authorPanel.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { authorPanelPropertyChange(evt); } }); jLabel4.setFont(new java.awt.Font("Verdana", 1, 13)); // NOI18N jLabel4.setText("Author and License"); jLabel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); authorArea.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N authorArea.setMinimumSize(new java.awt.Dimension(106, 150)); authorArea.setPreferredSize(new java.awt.Dimension(106, 150)); authorArea.addHyperlinkListener(new javax.swing.event.HyperlinkListener() { public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { authorAreaHyperlinkUpdate(evt); } }); authorArea.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { authorAreaPropertyChange(evt); } }); jScrollPane7.setViewportView(authorArea); javax.swing.GroupLayout authorPanelLayout = new javax.swing.GroupLayout(authorPanel); authorPanel.setLayout(authorPanelLayout); authorPanelLayout.setHorizontalGroup(authorPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(authorPanelLayout.createSequentialGroup().addContainerGap() .addGroup(authorPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jScrollPane7) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); authorPanelLayout.setVerticalGroup(authorPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(authorPanelLayout.createSequentialGroup().addGap(15, 15, 15) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addContainerGap())); contactPanel.setMinimumSize(new java.awt.Dimension(517, 445)); contactPanel.setPreferredSize(new java.awt.Dimension(517, 445)); contactPanel.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { contactPanelPropertyChange(evt); } }); jLabel5.setFont(new java.awt.Font("Verdana", 1, 13)); // NOI18N jLabel5.setText("Contact"); jLabel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); contactArea.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N contactArea.setMinimumSize(new java.awt.Dimension(500, 418)); contactArea.setPreferredSize(new java.awt.Dimension(500, 22)); contactArea.addHyperlinkListener(new javax.swing.event.HyperlinkListener() { public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent evt) { contactAreaHyperlinkUpdate(evt); } }); contactArea.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { contactAreaPropertyChange(evt); } }); jScrollPane8.setViewportView(contactArea); javax.swing.GroupLayout contactPanelLayout = new javax.swing.GroupLayout(contactPanel); contactPanel.setLayout(contactPanelLayout); contactPanelLayout.setHorizontalGroup(contactPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(contactPanelLayout.createSequentialGroup().addContainerGap() .addGroup(contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 497, Short.MAX_VALUE) .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addContainerGap())); contactPanelLayout .setVerticalGroup(contactPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(contactPanelLayout.createSequentialGroup().addGap(22, 22, 22) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane8).addGap(23, 23, 23))); javax.swing.GroupLayout aboutLayout = new javax.swing.GroupLayout(about.getContentPane()); about.getContentPane().setLayout(aboutLayout); aboutLayout.setHorizontalGroup(aboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(aboutLayout.createSequentialGroup().addContainerGap() .addGroup(aboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(contactPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(authorPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(aboutPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(23, Short.MAX_VALUE))); aboutLayout.setVerticalGroup(aboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, aboutLayout.createSequentialGroup() .addGroup(aboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, aboutLayout.createSequentialGroup().addGap(53, 53, 53) .addComponent(jButton6).addGap(18, 18, 18) .addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(jButton12) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, aboutLayout.createSequentialGroup().addContainerGap().addGroup(aboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(contactPanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE) .addComponent(authorPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 472, Short.MAX_VALUE) .addComponent(aboutPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGap(52, 52, 52))); warning.setTitle("Warning"); warning.setMinimumSize(new java.awt.Dimension(450, 175)); warning.setPreferredSize(new java.awt.Dimension(450, 175)); warning.setResizable(false); jLabel8.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N jLabel8.setText("No metadata values have been changed from the previous transfer."); jLabel9.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N jLabel9.setText(" Are you sure that you want to proceed?"); jButton13.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton13.setText("No"); jButton13.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton13ActionPerformed(evt); } }); jButton14.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton14.setText("Yes"); jButton14.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton14ActionPerformed(evt); } }); javax.swing.GroupLayout warningLayout = new javax.swing.GroupLayout(warning.getContentPane()); warning.getContentPane().setLayout(warningLayout); warningLayout.setHorizontalGroup(warningLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(warningLayout.createSequentialGroup().addContainerGap() .addGroup(warningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(warningLayout.createSequentialGroup().addComponent(jLabel9) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, warningLayout.createSequentialGroup().addGap(0, 1, Short.MAX_VALUE) .addComponent(jLabel8).addContainerGap( javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, warningLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton13) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton14).addGap(12, 12, 12))); warningLayout.setVerticalGroup(warningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(warningLayout.createSequentialGroup().addContainerGap() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(warningLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton13).addComponent(jButton14)) .addContainerGap(54, Short.MAX_VALUE))); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Exactly 0.1"); setBackground(new java.awt.Color(255, 255, 255)); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { formPropertyChange(evt); } }); jTabbedPane1.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT); jTabbedPane1.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N jTabbedPane1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTabbedPane1MouseClicked(evt); } }); jPanel5.setPreferredSize(new java.awt.Dimension(600, 543)); jScrollPane3.setPreferredSize(new java.awt.Dimension(571, 511)); jPanel1.setAutoscrolls(true); jLabel49.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel49.setText(" Destination"); jLabel49.setMaximumSize(new java.awt.Dimension(96, 17)); jLabel49.setMinimumSize(new java.awt.Dimension(96, 17)); jLabel49.setPreferredSize(new java.awt.Dimension(96, 17)); editInputDir1.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N editInputDir1.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { editInputDir1PropertyChange(evt); } }); btnDirChoose1.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N btnDirChoose1.setText("Browse"); btnDirChoose1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDirChoose1ActionPerformed(evt); } }); serializeBag.setText("Zip files?"); jProgressBar2.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jProgressBar2PropertyChange(evt); } }); jPanel11.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(128, 128, 128), 1, true)); jPanel11.setAutoscrolls(true); jPanel11.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jPanel11PropertyChange(evt); } }); jButton9.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton9.setText("Save"); jButton9.setAutoscrolls(true); jButton9.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); jButton9.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jButton9PropertyChange(evt); } }); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel10Layout.setVerticalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 43, Short.MAX_VALUE)); jButton1.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton1.setText("Add Fields"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); enableBagFields.setText("Show all reserved fields"); enableBagFields.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { enableBagFieldsActionPerformed(evt); } }); jButton3.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton3.setText("Save"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton9ActionPerformed(evt); } }); addFieldsButton.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N addFieldsButton.setText("Add Fields"); addFieldsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); addFieldsButton.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { addFieldsButtonPropertyChange(evt); } }); javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11); jPanel11.setLayout(jPanel11Layout); jPanel11Layout.setHorizontalGroup(jPanel11Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() .addContainerGap(236, Short.MAX_VALUE) .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup().addComponent(enableBagFields) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton3).addGap(49, 49, 49)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup().addComponent(addFieldsButton) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton9).addGap(47, 47, 47))))); jPanel11Layout.setVerticalGroup(jPanel11Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup() .addContainerGap(43, Short.MAX_VALUE) .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1).addComponent(enableBagFields).addComponent(jButton3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton9).addComponent(addFieldsButton)) .addGap(24, 24, 24))); hideTransfer.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N hideTransfer.setForeground(new java.awt.Color(0, 51, 255)); hideTransfer.setText("hide"); hideTransfer.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { hideTransferMouseClicked(evt); } }); hideTransfer.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { hideTransferPropertyChange(evt); } }); show.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N show.setText("v"); show.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { showPropertyChange(evt); } }); hide.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N hide.setText(">"); jLabel2.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel2.setText("Metadata"); showTransfer.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N showTransfer.setForeground(new java.awt.Color(0, 51, 255)); showTransfer.setText("show"); showTransfer.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { showTransferMouseClicked(evt); } }); jLabel47.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel47.setText("Title"); jLabel47.setMaximumSize(new java.awt.Dimension(96, 17)); jLabel47.setMinimumSize(new java.awt.Dimension(96, 17)); jLabel47.setPreferredSize(new java.awt.Dimension(96, 17)); bagNameField.setMinimumSize(new java.awt.Dimension(6, 23)); bagNameField.setPreferredSize(new java.awt.Dimension(6, 23)); bagNameField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { bagNameFieldActionPerformed(evt); } }); editInputDir.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N editInputDir.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { editInputDirPropertyChange(evt); } }); btnDirChoose.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N btnDirChoose.setText("Browse"); btnDirChoose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDirChooseActionPerformed(evt); } }); jLabel48.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel48.setText("Source"); jLabel48.setMaximumSize(new java.awt.Dimension(96, 17)); jLabel48.setMinimumSize(new java.awt.Dimension(96, 17)); jLabel48.setPreferredSize(new java.awt.Dimension(96, 17)); ftpDelivery.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N ftpDelivery.setText("FTP delivery"); jButton11.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton11.setText("+"); jButton11.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton11ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8); jPanel8.setLayout(jPanel8Layout); jPanel8Layout.setHorizontalGroup(jPanel8Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 2, Short.MAX_VALUE)); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(47, 47, 47) .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(bagNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(editInputDir, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnDirChoose) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton11)))) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(21, 21, 21) .addGroup(jPanel1Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(serializeBag) .addGap(18, 18, 18) .addComponent(ftpDelivery)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(editInputDir1, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnDirChoose1)) .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(hide, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(show, javax.swing.GroupLayout.PREFERRED_SIZE, 8, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel2) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(showTransfer) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hideTransfer))))) .addGap(0, 50, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(50, 50, 50).addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel47, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(bagNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel48, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnDirChoose).addComponent(jButton11) .addComponent(editInputDir, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(serializeBag).addComponent(ftpDelivery, javax.swing.GroupLayout.PREFERRED_SIZE, 15, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(editInputDir1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnDirChoose1).addComponent(jLabel49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(21, 21, 21) .addComponent(jProgressBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(34, 34, 34) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(show) .addComponent(hide, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2).addComponent(hideTransfer).addComponent(showTransfer)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap(159, Short.MAX_VALUE))); jScrollPane3.setViewportView(jPanel1); note.setFont(new java.awt.Font("Verdana", 0, 11)); // NOI18N note.setText("To copy and paste, use Windows shortcuts: \"control+c\" and \"control+v\""); note.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { notePropertyChange(evt); } }); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout .setHorizontalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 622, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(note, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(210, 210, 210))); jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup() .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 603, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(note).addContainerGap(34, Short.MAX_VALUE))); jTabbedPane1.addTab("Deliver", jPanel5); jLabel33.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel33.setText("Location"); jLabel33.setMaximumSize(new java.awt.Dimension(96, 17)); jLabel33.setMinimumSize(new java.awt.Dimension(96, 17)); jLabel33.setPreferredSize(new java.awt.Dimension(96, 17)); inputLocationDir.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N inputLocationDir.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.lightGray)); inputLocationDir.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { inputLocationDirPropertyChange(evt); } }); chooseDir.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N chooseDir.setText("Browse"); chooseDir.setMaximumSize(new java.awt.Dimension(95, 25)); chooseDir.setMinimumSize(new java.awt.Dimension(95, 25)); chooseDir.setPreferredSize(new java.awt.Dimension(95, 25)); chooseDir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseDirActionPerformed(evt); } }); validBagit.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N validBagit.setText("Validate"); validBagit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { validBagitActionPerformed(evt); } }); unBag.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N unBag.setText("Unpack"); unBag.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { unBagActionPerformed(evt); } }); jLabel34.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel34.setText("Destination"); jLabel34.setMaximumSize(new java.awt.Dimension(96, 17)); jLabel34.setMinimumSize(new java.awt.Dimension(96, 17)); jLabel34.setPreferredSize(new java.awt.Dimension(96, 17)); destDirLocation.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N destDirLocation.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(192, 192, 192))); destDirLocation.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { destDirLocationPropertyChange(evt); } }); chooseDestDir.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N chooseDestDir.setText("Browse"); chooseDestDir.setMaximumSize(new java.awt.Dimension(95, 25)); chooseDestDir.setMinimumSize(new java.awt.Dimension(95, 25)); chooseDestDir.setPreferredSize(new java.awt.Dimension(95, 25)); chooseDestDir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseDestDirActionPerformed(evt); } }); unBaggingProgress.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { unBaggingProgressPropertyChange(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addGap(100, 100, 100).addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(inputLocationDir, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(chooseDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(unBag, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(validBagit, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(unBaggingProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(destDirLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 303, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(chooseDestDir, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(96, Short.MAX_VALUE))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup().addGap(33, 33, 33) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(inputLocationDir, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chooseDir, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel33, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(validBagit).addGap(15, 15, 15) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(destDirLocation, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(chooseDestDir, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel34, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18).addComponent(unBag).addGap(18, 18, 18).addComponent(unBaggingProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(437, Short.MAX_VALUE))); jTabbedPane1.addTab("Receive", jPanel4); editCurrentStatus.setColumns(20); editCurrentStatus.setRows(5); editCurrentStatus.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { editCurrentStatusPropertyChange(evt); } }); jScrollPane1.setViewportView(editCurrentStatus); clearLog.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N clearLog.setText("clear log"); clearLog.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearLogActionPerformed(evt); } }); jPanel9.setMinimumSize(new java.awt.Dimension(64, 48)); jPanel9.setPreferredSize(new java.awt.Dimension(622, 1045)); jPanel9.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jPanel9PropertyChange(evt); } }); jLabel39.setFont(new java.awt.Font("Verdana", 1, 15)); // NOI18N jLabel39.setText("Email Settings"); jLabel40.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel40.setText("Mail Server"); jLabel41.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel41.setText("User name"); jLabel42.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel42.setText("Password"); mailServerField.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N mailServerField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { mailServerFieldActionPerformed(evt); } }); userNameField.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N passwordField.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel43.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel43.setForeground(new java.awt.Color(255, 0, 102)); jLabel43.setText("Provide smtp configurations for sending email."); saveBtn.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N saveBtn.setText("Check and Save"); saveBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveBtnActionPerformed(evt); } }); jButton4.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton4.setText("Close"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jLabel6.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel6.setText("Port"); serverPort.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel7.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel7.setText("Encryption Method"); sslProtocol.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N sslProtocol.setText("SSL Protocols"); sslProtocol.setToolTipText(""); sslProtocol.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { sslProtocolActionPerformed(evt); } }); tlsProtocol.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N tlsProtocol.setText("TLS Protocols"); tlsProtocol.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tlsProtocolActionPerformed(evt); } }); noneProtocol.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N noneProtocol.setText("None"); noneProtocol.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { noneProtocolActionPerformed(evt); } }); emailNotifications.setText("Enable email notifications"); javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout.setHorizontalGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(23, 23, 23).addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel7) .addComponent(jLabel42) .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel9Layout.createSequentialGroup().addComponent(jLabel40).addGap(56, 56, 56) .addComponent(mailServerField, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel9Layout.createSequentialGroup().addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel41) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(sslProtocol)) .addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(48, 48, 48) .addComponent(tlsProtocol).addGap(56, 56, 56) .addComponent(noneProtocol)) .addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel9Layout.createSequentialGroup() .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton4).addGap(18, 18, 18) .addComponent(saveBtn)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel9Layout .createSequentialGroup().addGap(12, 12, 12) .addGroup(jPanel9Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(userNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel43) .addGroup(jPanel9Layout.createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanel9Layout .createSequentialGroup() .addComponent(serverPort, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(emailNotifications)) .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)))))))) .addContainerGap(144, Short.MAX_VALUE))); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(19, 19, 19) .addComponent(jLabel39, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(17, 17, 17) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel40).addComponent(mailServerField, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel41).addComponent(userNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel42, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(passwordField, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(21, 21, 21) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(serverPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6).addComponent(emailNotifications)) .addGap(18, 18, 18).addComponent(jLabel7).addGap(18, 18, 18) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(sslProtocol).addComponent(tlsProtocol).addComponent(noneProtocol)) .addGap(18, 18, 18).addComponent(jLabel43).addGap(18, 18, 18) .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton4).addComponent(saveBtn)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel3.setMinimumSize(new java.awt.Dimension(64, 48)); jPanel3.setPreferredSize(new java.awt.Dimension(622, 1045)); jPanel3.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jPanel3PropertyChange(evt); } }); jLabel11.setFont(new java.awt.Font("Verdana", 1, 15)); // NOI18N jLabel11.setText("FTP Settings"); jLabel12.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel12.setText("Host"); ftpHost.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel13.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel13.setText("Port"); jLabel14.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel14.setText("Username"); jLabel16.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel16.setText("Password"); jLabel17.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel17.setText("Data Connection Mode"); activeMode.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N activeMode.setText("Active"); activeMode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { activeModeActionPerformed(evt); } }); passiveMode.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N passiveMode.setText("Passive"); passiveMode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { passiveModeActionPerformed(evt); } }); ftpPort.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N ftpPort.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); ftpUser.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton7.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton7.setText("Close"); jButton7.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton7ActionPerformed(evt); } }); jButton8.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton8.setText("Validate and Save"); jButton8.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton8ActionPerformed(evt); } }); ftpPass.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel18.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel18.setText("Destination"); ftpDestination.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11) .addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel12) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel14).addComponent(jLabel16).addComponent(jLabel18)) .addGap(14, 14, 14) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(ftpUser, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ftpHost, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ftpPort, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ftpPass, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(ftpDestination, javax.swing.GroupLayout.PREFERRED_SIZE, 299, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel3Layout.createSequentialGroup().addComponent(jLabel17) .addGap(53, 53, 53).addComponent(activeMode).addGap(31, 31, 31) .addComponent(passiveMode)))) .addGroup(jPanel3Layout.createSequentialGroup().addGap(173, 173, 173).addComponent(jButton7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton8))) .addContainerGap(200, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(24, 24, 24).addComponent(jLabel11) .addGap(18, 18, 18) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ftpHost, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel12)) .addGap(11, 11, 11) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel13).addComponent(ftpPort, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ftpUser, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel14)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ftpPass, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel16)) .addGap(18, 18, 18) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ftpDestination, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel18)) .addGap(18, 18, 18) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel17).addComponent(activeMode).addComponent(passiveMode)) .addGap(39, 39, 39) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton7).addComponent(jButton8)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jScrollPane2.setBorder(null); jScrollPane2.setPreferredSize(new java.awt.Dimension(622, 1045)); jScrollPane2.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jScrollPane2PropertyChange(evt); } }); jPanel7.setAutoscrolls(true); jPanel7.setMinimumSize(new java.awt.Dimension(64, 48)); jPanel7.setPreferredSize(new java.awt.Dimension(603, 450)); jLabel35.setFont(new java.awt.Font("Verdana", 1, 15)); // NOI18N jLabel35.setText("Email Notification"); jLabel36.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jLabel36.setForeground(new java.awt.Color(255, 0, 102)); jLabel36.setText("Send email notification(s) to:"); saveEmailBtn.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N saveEmailBtn.setText("Save"); saveEmailBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveEmailBtnActionPerformed(evt); } }); jPanel2.setPreferredSize(new java.awt.Dimension(569, 0)); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 0, Short.MAX_VALUE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 0, Short.MAX_VALUE)); jButton2.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton2.setText("+"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton5.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N jButton5.setText("Close"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout .setHorizontalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 611, Short.MAX_VALUE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup() .addContainerGap(62, Short.MAX_VALUE) .addGroup(jPanel7Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout .createSequentialGroup().addGroup(jPanel7Layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( jPanel7Layout.createSequentialGroup().addGap( 0, 50, Short.MAX_VALUE).addComponent( jLabel36) .addGap(224, 224, 224)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup().addComponent( jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addComponent(jButton2).addGap(51, 51, 51)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout .createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(26, 26, 26).addComponent(saveEmailBtn) .addGap(66, 66, 66))))); jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton2)) .addGap(16, 16, 16).addComponent(jLabel36) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(51, 51, 51) .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(saveEmailBtn).addComponent(jButton5)) .addContainerGap(545, Short.MAX_VALUE))); jScrollPane2.setViewportView(jPanel7); jLabel3.setIcon( new javax.swing.ImageIcon(getClass().getResource("/uk/sipperfly/ui/resources/Exactly1.png"))); // NOI18N currentTemplate.setBackground(new java.awt.Color(240, 240, 240)); currentTemplate.setColumns(20); currentTemplate.setFont(new java.awt.Font("Verdana", 0, 13)); // NOI18N currentTemplate.setRows(3); currentTemplate.setText(" Current Template: None"); currentTemplate.setBorder(null); currentTemplate.setCaretColor(new java.awt.Color(204, 204, 204)); currentTemplate.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { currentTemplatePropertyChange(evt); } }); jScrollPane4.setViewportView(currentTemplate); clearTempButton.setFont(new java.awt.Font("Verdana", 0, 12)); // NOI18N clearTempButton.setText("Clear Template"); clearTempButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { clearTempButtonActionPerformed(evt); } }); clearTempButton.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { clearTempButtonPropertyChange(evt); } }); btnTransferFiles.setFont(new java.awt.Font("Verdana", 0, 17)); // NOI18N btnTransferFiles.setText("Transfer"); btnTransferFiles.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnTransferFilesActionPerformed(evt); } }); btnCancel.setFont(new java.awt.Font("Verdana", 0, 17)); // NOI18N btnCancel.setText("Cancel"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); btnCancel.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { btnCancelPropertyChange(evt); } }); javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6); jPanel6.setLayout(jPanel6Layout); jPanel6Layout .setHorizontalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel6Layout.createSequentialGroup().addContainerGap(22, Short.MAX_VALUE) .addComponent(btnCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnTransferFiles).addGap(31, 31, 31))); jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCancel).addComponent(btnTransferFiles, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jMenu4.setText("Exactly"); export.setText("Export"); export.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exportActionPerformed(evt); } }); jMenu4.add(export); importXml.setText("Import"); importXml.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { importXmlActionPerformed(evt); } }); jMenu4.add(importXml); jMenuItem1.setText("About"); jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItem1ActionPerformed(evt); } }); jMenu4.add(jMenuItem1); quit.setText("Quit"); quit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { quitActionPerformed(evt); } }); jMenu4.add(quit); jMenuBar1.add(jMenu4); jMenu1.setText("Preferences"); emailNotification.setText("Email Notifications"); emailNotification.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { emailNotificationActionPerformed(evt); } }); jMenu1.add(emailNotification); jMenuBar1.add(jMenu1); jMenu2.setText("Admin"); emailSetting.setText("Email Settings"); emailSetting.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { emailSettingActionPerformed(evt); } }); jMenu2.add(emailSetting); ftpSettings.setText("FTP Settings"); ftpSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ftpSettingsActionPerformed(evt); } }); jMenu2.add(ftpSettings); jMenuBar1.add(jMenu2); 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().addGap(8, 8, 8) .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 600, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, 599, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 627, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup().addGap(0, 0, Short.MAX_VALUE) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 265, Short.MAX_VALUE) .addComponent(clearLog, javax.swing.GroupLayout.Alignment.TRAILING))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(clearTempButton, javax.swing.GroupLayout.Alignment.TRAILING)))) .addContainerGap()) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3).addGap(82, 82, 82))))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel9, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup().addGap(5, 5, 5).addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 304, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18).addComponent(clearLog) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(clearTempButton).addGap(0, 0, Short.MAX_VALUE)) .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 700, Short.MAX_VALUE)) .addContainerGap())); pack(); }
From source file:wsattacker.sso.openid.attacker.gui.MainGui.java
/** * This method is called from within the constructor to * initialize the form.// ww w .j a v a 2 s . c om * 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(); }
From source file:yp.tibco.com.yang.lottery.client.GraphicalLotteryClient.java
private void initComponents() { JLabel jLabel1 = new JLabel(); jTextFieldHost = new JTextField(); jButtonConnect = new JButton(); JLabel jLabel3 = new JLabel(); jSpinnerWidth = new JSpinner(); JLabel label5 = new JLabel(); jSpinnerChars = new JSpinner(); checkBoxContinuous = new JCheckBox(); JLabel jLabel2 = new JLabel(); jTextFieldPort = new JTextField(); jButtonDisconnect = new JButton(); JLabel jLabel4 = new JLabel(); jSpinnerHeight = new JSpinner(); jButtonSendRequest = new JButton(); imagePanel1 = new LotteryPanel(); //======== this ======== setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); setMinimumSize(new Dimension(700, 300)); setPreferredSize(new Dimension(740, 600)); Container contentPane = getContentPane(); contentPane.setLayout(new GridBagLayout()); ((GridBagLayout) contentPane.getLayout()).columnWidths = new int[] { 36, 167, 99, 41, 66, 75, 57, 96, 0, 0 };//from w w w .ja va 2 s .c o m ((GridBagLayout) contentPane.getLayout()).rowHeights = new int[] { 10, 31, 31, 256, 0 }; ((GridBagLayout) contentPane.getLayout()).columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0E-4 }; ((GridBagLayout) contentPane.getLayout()).rowWeights = new double[] { 0.0, 0.0, 0.0, 1.0, 1.0E-4 }; //---- jLabel1 ---- jLabel1.setText("Host"); contentPane.add(jLabel1, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0)); contentPane.add(jTextFieldHost, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jButtonConnect ---- jButtonConnect.setText("Connect"); jButtonConnect.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButtonConnectActionPerformed(); } }); contentPane.add(jButtonConnect, new GridBagConstraints(2, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jLabel3 ---- jLabel3.setText("Width"); contentPane.add(jLabel3, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0)); contentPane.add(jSpinnerWidth, new GridBagConstraints(4, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- label5 ---- label5.setText("characters"); contentPane.add(label5, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.VERTICAL, new Insets(0, 0, 5, 5), 0, 0)); contentPane.add(jSpinnerChars, new GridBagConstraints(6, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 10), 0, 0)); //---- checkBoxContinuous ---- checkBoxContinuous.setText("continuous"); contentPane.add(checkBoxContinuous, new GridBagConstraints(7, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jLabel2 ---- jLabel2.setText("Port"); contentPane.add(jLabel2, new GridBagConstraints(0, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 5), 0, 0)); contentPane.add(jTextFieldPort, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jButtonDisconnect ---- jButtonDisconnect.setText("Disconnect"); jButtonDisconnect.setEnabled(false); jButtonDisconnect.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButtonDisconnectActionPerformed(); } }); contentPane.add(jButtonDisconnect, new GridBagConstraints(2, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jLabel4 ---- jLabel4.setText("Height"); contentPane.add(jLabel4, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 5, 5), 0, 0)); contentPane.add(jSpinnerHeight, new GridBagConstraints(4, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //---- jButtonSendRequest ---- jButtonSendRequest.setText("Send Request"); jButtonSendRequest.setEnabled(false); jButtonSendRequest.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jButtonSendRequestActionPerformed(); } }); contentPane.add(jButtonSendRequest, new GridBagConstraints(5, 2, 2, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 5, 5, 10), 0, 0)); //======== imagePanel1 ======== { imagePanel1.setBackground(new Color(51, 153, 255)); imagePanel1.setPreferredSize(new Dimension(500, 500)); { // compute preferred size Dimension preferredSize = new Dimension(); for (int i = 0; i < imagePanel1.getComponentCount(); i++) { Rectangle bounds = imagePanel1.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 = imagePanel1.getInsets(); preferredSize.width += insets.right; preferredSize.height += insets.bottom; imagePanel1.setMinimumSize(preferredSize); imagePanel1.setPreferredSize(preferredSize); } } contentPane.add(imagePanel1, new GridBagConstraints(0, 3, 9, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(8, 5, 8, 5), 0, 0)); pack(); setLocationRelativeTo(getOwner()); }