List of usage examples for javax.swing GroupLayout PREFERRED_SIZE
int PREFERRED_SIZE
To view the source code for javax.swing GroupLayout PREFERRED_SIZE.
Click Source Link
From source file:com.pos.spatobiz.app.view.karyawan.TambahKaryawan.java
/** This method is called from within the constructor to * initialize the form.//from w w w . jav a2 s . co m * 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() { jeniskelamin = new ButtonGroup(); labelKode = new WhiteLabel(); labelNama = new WhiteLabel(); labelTanggalLahir = new WhiteLabel(); labelAlamat = new WhiteLabel(); textKode = new TextBoxTransfer(); textNama = new TextBoxTransfer(); textTanggalLahir = new DateBox(); textAlamat = new WhiteTextArea(); errorKode = new RedLabel(); errorNama = new RedLabel(); errorTanggalLahir = new RedLabel(); errorAlamat = new RedLabel(); textTelepon = new TextBoxTransfer(); labelTelepon = new WhiteLabel(); labelEmail = new WhiteLabel(); labelJenisKelamin = new WhiteLabel(); labelPhoto = new WhiteLabel(); textEmail = new TextBoxTransfer(); radioPria = new JRadioButton(); radioWanita = new JRadioButton(); errorTelepon = new RedLabel(); errorEmail = new RedLabel(); imageChooser = new ImageChooser(); buttonBatal = new Button(); buttonTambah = new Button(); setBackground(new Color(0, 0, 0)); labelKode.setHorizontalAlignment(SwingConstants.RIGHT); labelKode.setText("Kode :"); labelNama.setHorizontalAlignment(SwingConstants.RIGHT); labelNama.setText("Nama :"); labelTanggalLahir.setHorizontalAlignment(SwingConstants.RIGHT); labelTanggalLahir.setText("Tanggal Lahir :"); labelAlamat.setHorizontalAlignment(SwingConstants.RIGHT); labelAlamat.setText("Alamat :"); textTanggalLahir.setFormatterFactory( new DefaultFormatterFactory(new DateFormatter(DateFormat.getDateInstance(DateFormat.LONG)))); textTanggalLahir.setPreferredSize(new Dimension(120, 24)); textTanggalLahir.setValue(new Date()); errorKode.setText("error kode"); errorNama.setText("error nama"); errorTanggalLahir.setText("error tanggal lahir"); errorAlamat.setText("error alamat"); labelTelepon.setHorizontalAlignment(SwingConstants.RIGHT); labelTelepon.setText("Telepon :"); labelEmail.setHorizontalAlignment(SwingConstants.RIGHT); labelEmail.setText("Email :"); labelJenisKelamin.setHorizontalAlignment(SwingConstants.RIGHT); labelJenisKelamin.setText("Jenis Kelamin :"); labelPhoto.setHorizontalAlignment(SwingConstants.RIGHT); labelPhoto.setText("Photo :"); jeniskelamin.add(radioPria); radioPria.setFont(new Font("Tahoma", 1, 11)); // NOI18N radioPria.setForeground(new Color(255, 255, 255)); radioPria.setSelected(true); radioPria.setText("Pria"); radioPria.setOpaque(false); jeniskelamin.add(radioWanita); radioWanita.setFont(new Font("Tahoma", 1, 11)); radioWanita.setForeground(new Color(255, 255, 255)); radioWanita.setText("Wanita"); radioWanita.setOpaque(false); errorTelepon.setText("error telepon"); errorEmail.setText("error email"); buttonBatal.setMnemonic('B'); buttonBatal.setText("Batal"); buttonTambah.setMnemonic('T'); buttonTambah.setText("Tambah"); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createParallelGroup(Alignment.TRAILING, false) .addComponent(labelPhoto, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelJenisKelamin, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelEmail, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createParallelGroup(Alignment.TRAILING, false) .addComponent(labelTelepon, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelKode, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(Alignment.TRAILING) .addComponent(textAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textKode, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textTelepon, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addGroup(Alignment.LEADING, layout.createSequentialGroup().addComponent(radioPria) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(radioWanita)) .addComponent(imageChooser, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 253, GroupLayout.PREFERRED_SIZE) .addComponent(textEmail, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)) .addGap(4, 4, 4) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGroup(Alignment.TRAILING, layout.createSequentialGroup() .addComponent(buttonTambah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(labelAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textAlamat, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE) .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(textTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(labelTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelJenisKelamin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(radioPria).addComponent(radioWanita)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(labelPhoto, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(imageChooser, GroupLayout.PREFERRED_SIZE, 189, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(buttonTambah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); }
From source file:EnrollFingerprint.Enroll.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 a v a2 s .c o m*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanelBackground = new javax.swing.JPanel(); picFingerprint = new javax.swing.JLabel(); jPanelConsole = new javax.swing.JPanel(); txtConsole = new javax.swing.JTextField(); lblConsole = new javax.swing.JLabel(); btnSave = new javax.swing.JButton(); btnCancel = new javax.swing.JButton(); jPanelLog = new javax.swing.JPanel(); JScrollPane1 = new javax.swing.JScrollPane(); txtLog = new javax.swing.JTextArea(); lblLog = new javax.swing.JLabel(); btnRead = new javax.swing.JButton(); lblStatus = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Almacenar Huellas"); setResizable(false); jPanelBackground.setBackground(new java.awt.Color(238, 241, 245)); picFingerprint.setBackground(new java.awt.Color(255, 255, 255)); picFingerprint.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelConsole.setBackground(new java.awt.Color(255, 255, 255)); txtConsole.setEditable(false); txtConsole.setForeground(new java.awt.Color(136, 136, 136)); txtConsole.setText("Consola de estado"); lblConsole.setForeground(new java.awt.Color(136, 136, 136)); lblConsole.setText("Consola:"); javax.swing.GroupLayout jPanelConsoleLayout = new javax.swing.GroupLayout(jPanelConsole); jPanelConsole.setLayout(jPanelConsoleLayout); jPanelConsoleLayout.setHorizontalGroup(jPanelConsoleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelConsoleLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelConsoleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(txtConsole).addGroup(jPanelConsoleLayout.createSequentialGroup() .addComponent(lblConsole).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanelConsoleLayout.setVerticalGroup(jPanelConsoleLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelConsoleLayout.createSequentialGroup() .addGap(5, 5, 5).addComponent(lblConsole) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtConsole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(15, Short.MAX_VALUE))); btnSave.setText("Guardar"); btnSave.setEnabled(false); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnCancel.setText("Cancelar"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); jPanelLog.setBackground(new java.awt.Color(255, 255, 255)); txtLog.setEditable(false); txtLog.setColumns(20); txtLog.setForeground(new java.awt.Color(168, 168, 168)); txtLog.setRows(5); JScrollPane1.setViewportView(txtLog); lblLog.setForeground(new java.awt.Color(136, 136, 136)); lblLog.setText("Estado:"); javax.swing.GroupLayout jPanelLogLayout = new javax.swing.GroupLayout(jPanelLog); jPanelLog.setLayout(jPanelLogLayout); jPanelLogLayout.setHorizontalGroup(jPanelLogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelLogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(JScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 409, Short.MAX_VALUE) .addGroup(jPanelLogLayout.createSequentialGroup().addComponent(lblLog).addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanelLogLayout.setVerticalGroup(jPanelLogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelLogLayout.createSequentialGroup().addContainerGap().addComponent(lblLog) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(JScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 192, Short.MAX_VALUE) .addContainerGap())); btnRead.setText("Leer Huella"); btnRead.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnReadActionPerformed(evt); } }); lblStatus.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N lblStatus.setText("Intentos"); javax.swing.GroupLayout jPanelBackgroundLayout = new javax.swing.GroupLayout(jPanelBackground); jPanelBackground.setLayout(jPanelBackgroundLayout); jPanelBackgroundLayout.setHorizontalGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanelBackgroundLayout.createSequentialGroup() .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelConsole, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanelLog, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addComponent(lblStatus) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnRead) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnSave) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnCancel))) .addContainerGap())); jPanelBackgroundLayout.setVerticalGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup().addContainerGap() .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelBackgroundLayout.createSequentialGroup() .addComponent(jPanelConsole, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelLog, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(picFingerprint, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE) .addGroup(jPanelBackgroundLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCancel).addComponent(btnSave).addComponent(btnRead) .addComponent(lblStatus)) .addContainerGap())); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent( jPanelBackground, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:graphics.MainWindow.java
/** This method is called from within the constructor to * initialize the form./* w w w . ja v a2s .com*/ * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jPanelpos1 = new javax.swing.JPanel(); jPanelpos2 = new javax.swing.JPanel(); jPanelpos3 = new javax.swing.JPanel(); jPanelpos4 = new javax.swing.JPanel(); jPanelpos5 = new javax.swing.JPanel(); jPanelpos6 = new javax.swing.JPanel(); jPanelpos7 = new javax.swing.JPanel(); jPanelpos8 = new javax.swing.JPanel(); jPanelpos9 = new javax.swing.JPanel(); jPanelpos10 = new javax.swing.JPanel(); jPanelpos11 = new javax.swing.JPanel(); jPanelpos12 = new javax.swing.JPanel(); jPanelpos13 = new javax.swing.JPanel(); jPanelpos14 = new javax.swing.JPanel(); jPanelpos15 = new javax.swing.JPanel(); jPanelpos16 = new javax.swing.JPanel(); jMenuBar6 = new javax.swing.JMenuBar(); jMenu6 = new javax.swing.JMenu(); Start = new javax.swing.JMenuItem(); PauseMenuItem = new javax.swing.JCheckBoxMenuItem(); Stop = new javax.swing.JMenuItem(); Exit = new javax.swing.JMenuItem(); jMenu1 = new javax.swing.JMenu(); SimulationConf = new javax.swing.JMenuItem(); AddSpecie = new javax.swing.JMenuItem(); AddCell = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); Help = new javax.swing.JMenuItem(); About = new javax.swing.JMenuItem(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jPanel1.setLayout(new java.awt.GridLayout(4, 4)); jPanelpos1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos1.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos1); jPanelpos2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos2.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos2); jPanelpos3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos3.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos3); jPanelpos4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos4.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos4); jPanelpos5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos5.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos5); jPanelpos6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos6.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos6); jPanelpos7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos7.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos7); jPanelpos8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos8.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos8); jPanelpos9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos9.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos9); jPanelpos10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos10.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos10); jPanelpos11.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos11.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos11); jPanelpos12.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos12.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos12); jPanelpos13.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos13.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos13); jPanelpos14.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos14.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos14); jPanelpos15.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos15.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos15); jPanelpos16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jPanelpos16.setLayout(new java.awt.CardLayout()); jPanel1.add(jPanelpos16); jMenu6.setText("Simulation"); Start.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK)); Start.setText("Start"); Start.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { StartActionPerformed(evt); } }); jMenu6.add(Start); PauseMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK)); PauseMenuItem.setText("Pause"); PauseMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { PauseMenuItemActionPerformed(evt); } }); jMenu6.add(PauseMenuItem); Stop.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK)); Stop.setText("Stop"); Stop.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { StopActionPerformed(evt); } }); jMenu6.add(Stop); Exit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK)); Exit.setText("Exit"); Exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExitActionPerformed(evt); } }); jMenu6.add(Exit); jMenuBar6.add(jMenu6); jMenu1.setText("Edit"); SimulationConf.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_C, java.awt.event.InputEvent.ALT_MASK | java.awt.event.InputEvent.CTRL_MASK)); SimulationConf.setText("Simulation Configuration"); SimulationConf.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { SimulationConfActionPerformed(evt); } }); jMenu1.add(SimulationConf); AddSpecie.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); AddSpecie.setText("Add New Specie"); AddSpecie.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddSpecieActionPerformed(evt); } }); jMenu1.add(AddSpecie); AddCell.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK)); AddCell.setText("Add New Cell"); AddCell.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { AddCellActionPerformed(evt); } }); jMenu1.add(AddCell); jMenuBar6.add(jMenu1); jMenu2.setText("Help"); Help.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK)); Help.setText("Help"); jMenu2.add(Help); About.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.SHIFT_MASK | java.awt.event.InputEvent.CTRL_MASK)); About.setText("About"); jMenu2.add(About); jMenuBar6.add(jMenu2); setJMenuBar(jMenuBar6); 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(66, 66, 66).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 468, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(76, Short.MAX_VALUE))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout .createSequentialGroup().addGap(47, 47, 47).addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(60, Short.MAX_VALUE))); pack(); }
From source file:it.isislab.dmason.util.SystemManagement.Worker.thrower.DMasonWorkerWithGui.java
private void initComponents() { scrollPane1 = new JScrollPane(); textArea = new JTextArea(); textArea.setEditable(false);//from w w w .j a va2 s .c om btnConnect = new JButton(); label1 = new JLabel(); label2 = new JLabel(); cmbPort = new JComboBox(); label3 = new JLabel(); labelnumber = new JLabel(); lblLogo = new JLabel(); cmbIp = new JComboBox(); //======== this ======== setTitle(Release.PRODUCT_RELEASE + " Worker " + VERSION); Container contentPane = getContentPane(); //======== scrollPane1 ======== { scrollPane1.setViewportView(textArea); } //---- btnConnect ---- btnConnect.setText("Connect"); btnConnect.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { btnConnectOnClick(e); } }); //---- label1 ---- label1.setText("Server IP:"); //---- label2 ---- label2.setText("Server port:"); //---- label3 ---- label3.setText(""); //---- labelnumber ---- labelnumber.setText(""); //---- label4 ---- lblLogo.setText("Distributed Mason 'failed to load image'"); lblLogo.setIcon(new ImageIcon("resources/image/carmineworker.png")); //---- comboBox ---- cmbIp.setEditable(true); cmbPort.setEditable(true); try { Scanner in = new Scanner(new FileInputStream("resources/files/urlworker")); while (in.hasNext()) { String line = in.nextLine(); String[] args = line.split(":"); cmbIp.addItem(args[0]); cmbPort.addItem(args[1]); } } catch (Exception e) { System.out.println("No worker story found!"); } cmbIp.setSelectedIndex(0); cmbPort.setSelectedIndex(0); GroupLayout contentPaneLayout = new GroupLayout(contentPane); contentPane.setLayout(contentPaneLayout); contentPaneLayout.setHorizontalGroup(contentPaneLayout.createParallelGroup().addGroup(contentPaneLayout .createSequentialGroup().addContainerGap() .addGroup(contentPaneLayout.createParallelGroup() .addComponent(lblLogo, GroupLayout.PREFERRED_SIZE, 400, GroupLayout.PREFERRED_SIZE) .addGroup(contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup() .addGroup(contentPaneLayout.createParallelGroup().addComponent(label2) .addComponent(label1)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(contentPaneLayout .createParallelGroup(GroupLayout.Alignment.LEADING, false) .addComponent(cmbPort).addComponent(cmbIp, 0, 119, Short.MAX_VALUE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup() .addGap(78, 78, 78).addComponent(btnConnect)) .addGroup(contentPaneLayout.createSequentialGroup() .addGap(46, 46, 46).addComponent(label3) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(labelnumber, GroupLayout.PREFERRED_SIZE, 69, GroupLayout.PREFERRED_SIZE)))) .addGroup(GroupLayout.Alignment.TRAILING, contentPaneLayout.createSequentialGroup().addGap(9, 9, 9) .addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 366, GroupLayout.PREFERRED_SIZE) .addGap(462, 462, 462)))) .addGap(20, 20, 20))); contentPaneLayout.setVerticalGroup(contentPaneLayout.createParallelGroup() .addGroup(contentPaneLayout.createSequentialGroup().addContainerGap(21, Short.MAX_VALUE) .addComponent(lblLogo, GroupLayout.PREFERRED_SIZE, 102, GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(contentPaneLayout.createParallelGroup().addComponent(label1) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(btnConnect).addComponent(cmbIp, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(label2).addComponent(cmbPort, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGroup(contentPaneLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(label3).addComponent(labelnumber))) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(scrollPane1, GroupLayout.PREFERRED_SIZE, 238, GroupLayout.PREFERRED_SIZE) .addGap(16, 16, 16))); setSize(410, 495); setLocationRelativeTo(getOwner()); }
From source file:com.willwinder.universalgcodesender.ExperimentalWindow.java
/** This method is called from within the constructor to * initialize the form./* www .ja v a2s. co m*/ * 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() { controlContextTabbedPane = new javax.swing.JTabbedPane(); actionPanel = new com.willwinder.universalgcodesender.uielements.action.ActionPanel(backend); macroEditPanel = new javax.swing.JScrollPane(); macroPanel = new com.willwinder.universalgcodesender.uielements.MacroPanel(backend); visualizerPanel = new com.willwinder.universalgcodesender.visualizer.VisualizerPanel(backend); connectionPanel = new com.willwinder.universalgcodesender.uielements.connection.ConnectionPanel(backend); commandPanel = new com.willwinder.universalgcodesender.uielements.command.CommandPanel(backend); mainMenuBar = new javax.swing.JMenuBar(); settingsMenu = new javax.swing.JMenu(); grblConnectionSettingsMenuItem = new javax.swing.JMenuItem(); firmwareSettingsMenu = new javax.swing.JMenu(); grblFirmwareSettingsMenuItem = new javax.swing.JMenuItem(); pendantMenu = new com.willwinder.universalgcodesender.uielements.pendant.PendantMenu(backend); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMinimumSize(new java.awt.Dimension(640, 520)); controlContextTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder("")); controlContextTabbedPane.setMinimumSize(new java.awt.Dimension(395, 175)); controlContextTabbedPane.setPreferredSize(new java.awt.Dimension(2000, 283)); controlContextTabbedPane.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentShown(java.awt.event.ComponentEvent evt) { controlContextTabbedPaneComponentShown(evt); } }); controlContextTabbedPane.addTab("Machine Control", actionPanel); macroEditPanel.setViewportView(macroPanel); controlContextTabbedPane.addTab("Macros", macroEditPanel); controlContextTabbedPane.addTab("Visualizer", visualizerPanel); connectionPanel.setMinimumSize(new java.awt.Dimension(1, 1)); connectionPanel.setPreferredSize(new java.awt.Dimension(275, 130)); settingsMenu.setText("Settings"); grblConnectionSettingsMenuItem.setText("Sender Settings"); grblConnectionSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { grblConnectionSettingsMenuItemActionPerformed(evt); } }); settingsMenu.add(grblConnectionSettingsMenuItem); firmwareSettingsMenu.setText("Firmware Settings"); grblFirmwareSettingsMenuItem.setText("GRBL"); grblFirmwareSettingsMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { grblFirmwareSettingsMenuItemActionPerformed(evt); } }); firmwareSettingsMenu.add(grblFirmwareSettingsMenuItem); settingsMenu.add(firmwareSettingsMenu); mainMenuBar.add(settingsMenu); pendantMenu.setText("Pendant"); mainMenuBar.add(pendantMenu); setJMenuBar(mainMenuBar); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(layout .createSequentialGroup() .add(connectionPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 764, Short.MAX_VALUE) .add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(controlContextTabbedPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 294, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(commandPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 350, Short.MAX_VALUE)) .add(connectionPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:drusy.ui.panels.InternetStatePanel.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Evaluation license - Kvin Renella headerPanel = new JPanel(); label1 = new JLabel(); mainPanel = new JPanel(); ipv4TitleLabel = new JLabel(); ipv4ContentLabel = new JTextField(); connectionStateTitleLabel = new JLabel(); connectionStateContentLabel = new JTextField(); downloadContentLabel = new JTextField(); downloadTitleLabel = new JLabel(); maxUploadTitleLabel = new JLabel(); maxUploadContentLabel = new JTextField(); maxDownloadTitleLabel = new JLabel(); maxDownloadContentLabel = new JTextField(); uploadTitleLabel = new JLabel(); uploadContentLabel = new JTextField(); ipv6ContentLabel = new JTextField(); ipv6TitleLabel = new JLabel(); uptimeContentLabel = new JTextField(); uptimeTitleLabel = new JLabel(); //======== this ======== setMinimumSize(new Dimension(100, 71)); setLayout(new BorderLayout()); //======== headerPanel ======== {/*from ww w.j a v a 2 s .c o m*/ headerPanel.setLayout(new BorderLayout()); //---- label1 ---- label1.setText("This panel shows you an overview of the internet connection"); label1.setHorizontalAlignment(SwingConstants.CENTER); headerPanel.add(label1, BorderLayout.CENTER); } add(headerPanel, BorderLayout.NORTH); //======== mainPanel ======== { mainPanel.setOpaque(false); mainPanel.setMinimumSize(new Dimension(100, 100)); //---- ipv4TitleLabel ---- ipv4TitleLabel.setText("IP v4 :"); ipv4TitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- ipv4ContentLabel ---- ipv4ContentLabel.setEditable(false); ipv4ContentLabel.setText("192.168.0.1"); ipv4ContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- connectionStateTitleLabel ---- connectionStateTitleLabel.setText("Connection State :"); connectionStateTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- connectionStateContentLabel ---- connectionStateContentLabel.setEditable(false); connectionStateContentLabel.setText("up"); connectionStateContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- downloadContentLabel ---- downloadContentLabel.setEditable(false); downloadContentLabel.setText("- ko/s"); downloadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- downloadTitleLabel ---- downloadTitleLabel.setText("Download Bandwidth :"); downloadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxUploadTitleLabel ---- maxUploadTitleLabel.setText("Max Upload Bandwidth :"); maxUploadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxUploadContentLabel ---- maxUploadContentLabel.setEditable(false); maxUploadContentLabel.setText("- ko/s"); maxUploadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- maxDownloadTitleLabel ---- maxDownloadTitleLabel.setText("Max Download Bandwidth :"); maxDownloadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- maxDownloadContentLabel ---- maxDownloadContentLabel.setEditable(false); maxDownloadContentLabel.setText("- ko/s"); maxDownloadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- uploadTitleLabel ---- uploadTitleLabel.setText("Upload Bandwidth :"); uploadTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- uploadContentLabel ---- uploadContentLabel.setEditable(false); uploadContentLabel.setText("- ko/s"); uploadContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- ipv6ContentLabel ---- ipv6ContentLabel.setEditable(false); ipv6ContentLabel.setText("::1:"); ipv6ContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- ipv6TitleLabel ---- ipv6TitleLabel.setText("IP v6 :"); ipv6TitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); //---- uptimeContentLabel ---- uptimeContentLabel.setEditable(false); uptimeContentLabel.setText("0 min"); uptimeContentLabel.setHorizontalAlignment(SwingConstants.CENTER); //---- uptimeTitleLabel ---- uptimeTitleLabel.setText("Uptime :"); uptimeTitleLabel.setHorizontalAlignment(SwingConstants.RIGHT); GroupLayout mainPanelLayout = new GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup(mainPanelLayout.createParallelGroup() .addGroup(mainPanelLayout.createSequentialGroup().addContainerGap() .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.TRAILING) .addComponent(connectionStateTitleLabel).addComponent(downloadTitleLabel) .addComponent(ipv4TitleLabel).addComponent(maxUploadTitleLabel) .addComponent(maxDownloadTitleLabel).addComponent(uploadTitleLabel) .addComponent(ipv6TitleLabel).addComponent(uptimeTitleLabel)) .addGap(10, 10, 10) .addGroup(mainPanelLayout.createParallelGroup() .addComponent(ipv4ContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(connectionStateContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(downloadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(maxUploadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(maxDownloadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(uploadContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(ipv6ContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addComponent(uptimeContentLabel, GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE)) .addContainerGap())); mainPanelLayout.setVerticalGroup(mainPanelLayout.createParallelGroup() .addGroup(mainPanelLayout.createSequentialGroup().addGap(20, 20, 20) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(ipv4TitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(ipv4ContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(ipv6TitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(ipv6ContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(connectionStateTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(connectionStateContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(uploadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(uploadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(maxUploadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(maxUploadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(downloadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(downloadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(maxDownloadTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(maxDownloadContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(mainPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(uptimeTitleLabel, GroupLayout.PREFERRED_SIZE, 22, GroupLayout.PREFERRED_SIZE) .addComponent(uptimeContentLabel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); } add(mainPanel, BorderLayout.CENTER); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.peterbochs.instrument.InstrumentPanel.java
private void initGUI() { try {//from w w w . ja v a2s . co m { BorderLayout thisLayout = new BorderLayout(); this.setLayout(thisLayout); this.setPreferredSize(new java.awt.Dimension(870, 609)); { jTabbedPane1 = new JTabbedPane(); this.add(jTabbedPane1, BorderLayout.CENTER); jTabbedPane1.setTabPlacement(JTabbedPane.LEFT); jTabbedPane1.setPreferredSize(new java.awt.Dimension(661, 419)); { jMemoryPanel = new JPanel(); GroupLayout jMemoryPanelLayout = new GroupLayout((JComponent) jMemoryPanel); jMemoryPanel.setLayout(jMemoryPanelLayout); jTabbedPane1.addTab("Memory", null, jMemoryPanel, null); jTabbedPane1.addTab("Profiling", null, getJMemoryProfilingPanel(), null); jTabbedPane1.addTab("Jmp", null, getJmpPanel(), null); jTabbedPane1.addTab("Call graph", null, getJTabbedPane3(), null); jTabbedPane1.addTab("Interrupt", null, getJPanel11(), null); jMemoryPanelLayout.setVerticalGroup(jMemoryPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(jMemoryPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(getJFromComboBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel4x(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel6(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJToComboBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel5x(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJBlockSizeComboBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel3(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJSearchTextField(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, 24, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJTabbedPane2(), 0, 224, Short.MAX_VALUE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jMemoryPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(getJLabel1(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel2(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jMemoryPanelLayout.createParallelGroup() .addComponent(getJHostestAddressScrollPane(), GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 110, GroupLayout.PREFERRED_SIZE) .addGroup(GroupLayout.Alignment.LEADING, jMemoryPanelLayout .createSequentialGroup() .addComponent(getJLabel4(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJLabel5(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addGap(74))) .addComponent(getJPanel1(), GroupLayout.PREFERRED_SIZE, 28, GroupLayout.PREFERRED_SIZE) .addContainerGap()); jMemoryPanelLayout.linkSize(SwingConstants.VERTICAL, new Component[] { getJSearchTextField(), getJFromComboBox(), getJToComboBox(), getJBlockSizeComboBox() }); jMemoryPanelLayout .setHorizontalGroup(jMemoryPanelLayout.createSequentialGroup().addContainerGap() .addGroup( jMemoryPanelLayout.createParallelGroup().addGroup(jMemoryPanelLayout .createSequentialGroup().addGroup(jMemoryPanelLayout .createParallelGroup().addGroup( GroupLayout.Alignment.LEADING, jMemoryPanelLayout.createSequentialGroup() .addComponent(getJLabel3(), GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE) .addComponent(getJSearchTextField(), GroupLayout.PREFERRED_SIZE, 151, GroupLayout.PREFERRED_SIZE)) .addGroup(GroupLayout.Alignment.LEADING, jMemoryPanelLayout.createSequentialGroup() .addComponent(getJLabel2(), GroupLayout.PREFERRED_SIZE, 96, GroupLayout.PREFERRED_SIZE) .addGap(125)) .addGroup( GroupLayout.Alignment.LEADING, jMemoryPanelLayout .createSequentialGroup() .addComponent( getJPanel1(), GroupLayout.PREFERRED_SIZE, 182, GroupLayout.PREFERRED_SIZE) .addGap(39)) .addGroup(jMemoryPanelLayout.createSequentialGroup() .addPreferredGap(getJLabel2(), getJLabel4(), LayoutStyle.ComponentPlacement.INDENT) .addGroup(jMemoryPanelLayout .createParallelGroup() .addComponent(getJLabel4(), GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE) .addComponent( getJLabel5(), GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 160, GroupLayout.PREFERRED_SIZE)) .addGap(49))) .addGroup(jMemoryPanelLayout.createParallelGroup() .addComponent(getJHostestAddressScrollPane(), GroupLayout.Alignment.LEADING, 0, 498, Short.MAX_VALUE) .addGroup(GroupLayout.Alignment.LEADING, jMemoryPanelLayout.createSequentialGroup() .addGroup(jMemoryPanelLayout .createParallelGroup() .addGroup( GroupLayout.Alignment.LEADING, jMemoryPanelLayout .createSequentialGroup() .addPreferredGap( getJLabel1(), getJLabel4x(), LayoutStyle.ComponentPlacement.INDENT) .addComponent( getJLabel4x(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED) .addComponent( getJFromComboBox(), GroupLayout.PREFERRED_SIZE, 139, GroupLayout.PREFERRED_SIZE)) .addGroup( GroupLayout.Alignment.LEADING, jMemoryPanelLayout .createSequentialGroup() .addComponent( getJLabel1(), GroupLayout.PREFERRED_SIZE, 112, GroupLayout.PREFERRED_SIZE) .addGap(80))) .addComponent( getJLabel6(), GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE) .addComponent(getJToComboBox(), GroupLayout.PREFERRED_SIZE, 120, GroupLayout.PREFERRED_SIZE) .addPreferredGap( LayoutStyle.ComponentPlacement.RELATED, 0, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel5x(), GroupLayout.PREFERRED_SIZE, 69, GroupLayout.PREFERRED_SIZE) .addComponent( getJBlockSizeComboBox(), GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE) .addGap(0, 9, Short.MAX_VALUE)))) .addComponent(getJTabbedPane2(), GroupLayout.Alignment.LEADING, 0, 719, Short.MAX_VALUE)) .addContainerGap()); jMemoryPanelLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] { getJFromComboBox(), getJToComboBox() }); } } } } catch (Exception e) { e.printStackTrace(); } // ToolTipManager.sharedInstance().setInitialDelay(0); }
From source file:com.yifanlu.PSXperiaTool.Interface.GUI.java
/** * This method is called from within the constructor to * initialize the form.//from w w w . j a v a2 s. c o m * 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() { tabbedPane = new javax.swing.JTabbedPane(); informationPanel = new javax.swing.JPanel(); licenseCheck1 = new javax.swing.JCheckBox(); licenseCheck2 = new javax.swing.JCheckBox(); licenseCheck3 = new javax.swing.JCheckBox(); licenseCheck4 = new javax.swing.JCheckBox(); textScrollPane = new javax.swing.JScrollPane(); licenseText = new javax.swing.JTextArea(); extractPanel = new javax.swing.JPanel(); extractInformation = new javax.swing.JLabel(); apkFileLabel = new javax.swing.JLabel(); apkFileInput = new javax.swing.JTextField(); zpakFileInput = new javax.swing.JTextField(); extractOutputInput = new javax.swing.JTextField(); zpakFileLabel = new javax.swing.JLabel(); extractOutputLabel = new javax.swing.JLabel(); chooseZpakFile = new javax.swing.JButton(); chooseApkFile = new javax.swing.JButton(); chooseOutputDir = new javax.swing.JButton(); extractProgress = new javax.swing.JProgressBar(); extractButton = new javax.swing.JButton(); extractStatus = new javax.swing.JLabel(); createPanel = new javax.swing.JPanel(); chooseData = new javax.swing.JButton(); dataInput = new javax.swing.JTextField(); dataLabel = new javax.swing.JLabel(); isoLabel = new javax.swing.JLabel(); isoInput = new javax.swing.JTextField(); chooseIso = new javax.swing.JButton(); chooseIcon = new javax.swing.JButton(); convertOutputInput = new javax.swing.JTextField(); convertOutputLabel = new javax.swing.JLabel(); chooseConvertOutput = new javax.swing.JButton(); convertSeparator = new javax.swing.JSeparator(); loadXmlButton = new javax.swing.JButton(); gameInformationLabel = new javax.swing.JLabel(); titleIdLabel = new javax.swing.JLabel(); titleIdInput = new javax.swing.JTextField(); nameInput = new javax.swing.JTextField(); nameLabel = new javax.swing.JLabel(); developerInput = new javax.swing.JTextField(); developerLabel = new javax.swing.JLabel(); publisherLabel = new javax.swing.JLabel(); publisherInput = new javax.swing.JTextField(); descriptionLabel = new javax.swing.JLabel(); descriptionTextPane = new javax.swing.JScrollPane(); descriptionTextInput = new javax.swing.JTextArea(); convertProgress = new javax.swing.JProgressBar(); parentalRatingLabel = new javax.swing.JLabel(); parentalRatingInput = new javax.swing.JTextField(); storeTypeLabel = new javax.swing.JLabel(); storeTypeInput = new javax.swing.JTextField(); analogModeCheckbox = new javax.swing.JCheckBox(); convertButton = new javax.swing.JButton(); getTitleIdButton = new javax.swing.JButton(); iconImagePreview = new javax.swing.JLabel(); convertStatus = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("PSXperia Tool"); setName("PSXperia Tool"); // NOI18N setPreferredSize(new java.awt.Dimension(800, 540)); setResizable(false); setSize(new java.awt.Dimension(800, 540)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); tabbedPane.setPreferredSize(new java.awt.Dimension(800, 530)); licenseCheck1.setText("Yes, I own a Xperia Play and the Crash Bandicoot APK"); licenseCheck2.setText("Yes, I own the game(s) I will convert and have permission to use them"); licenseCheck3.setText("Yes, I will not distribute/redistribute any of the files generated by this tool"); licenseCheck4.setText("Yes, I understand this is a free tool and does not come with any warranties"); licenseText.setColumns(20); licenseText.setEditable(false); licenseText.setLineWrap(true); licenseText.setRows(5); licenseText.setText( "This tool is designed to allow you to convert PSX game(s) that you OWN and have permission to USE on your Android phone by modifying the files from the \"Crash Bandicoot\" game that is included with the Xperia Play. You must own these files too and the phone to obtain the necessary files. Please understand that piracy hurts the game industry and prevents developers from earning money for their hard work, so do not distribute any files you create with this tool. Finally, know that this tool is completely free and open source and should not be sold as is or part of any package. If you understand all of this, check the boxes and highlight my name below to enable the tool.\n\n-Yifan Lu\nhttp://yifan.lu/\nhttp://github.com/yifanlu/PSXperia\n"); licenseText.setWrapStyleWord(true); licenseText.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { licenseTextCaretUpdate(evt); } }); textScrollPane.setViewportView(licenseText); org.jdesktop.layout.GroupLayout informationPanelLayout = new org.jdesktop.layout.GroupLayout( informationPanel); informationPanel.setLayout(informationPanelLayout); informationPanelLayout.setHorizontalGroup(informationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(informationPanelLayout.createSequentialGroup().addContainerGap().add(informationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(textScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 739, Short.MAX_VALUE) .add(licenseCheck4).add(licenseCheck3).add(licenseCheck2).add(licenseCheck1)) .addContainerGap())); informationPanelLayout.setVerticalGroup(informationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, informationPanelLayout.createSequentialGroup() .addContainerGap() .add(textScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 328, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(licenseCheck1) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(licenseCheck2) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(licenseCheck3) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(licenseCheck4) .addContainerGap())); tabbedPane.addTab("Information", informationPanel); java.util.ResourceBundle bundle = java.util.ResourceBundle .getBundle("com/yifanlu/PSXperiaTool/Interface/Strings"); // NOI18N extractInformation.setText(bundle.getString("extract.directions")); // NOI18N apkFileLabel.setText(bundle.getString("extract.apkfile")); // NOI18N zpakFileLabel.setText(bundle.getString("extract.zpakfile")); // NOI18N extractOutputLabel.setText(bundle.getString("extract.output")); // NOI18N chooseZpakFile.setText(bundle.getString("extract.choose")); // NOI18N chooseZpakFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseZpakFileActionPerformed(evt); } }); chooseApkFile.setText(bundle.getString("extract.choose")); // NOI18N chooseApkFile.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseApkFileActionPerformed(evt); } }); chooseOutputDir.setText(bundle.getString("extract.choose")); // NOI18N chooseOutputDir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseOutputDirActionPerformed(evt); } }); extractButton.setText(bundle.getString("extract.extract")); // NOI18N extractButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { extractButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout extractPanelLayout = new org.jdesktop.layout.GroupLayout(extractPanel); extractPanel.setLayout(extractPanelLayout); extractPanelLayout.setHorizontalGroup(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, extractPanelLayout.createSequentialGroup() .addContainerGap() .add(extractPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, extractStatus, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 739, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, extractInformation, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 739, Short.MAX_VALUE) .add(extractPanelLayout.createSequentialGroup().add(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, extractPanelLayout .createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 5, Short.MAX_VALUE) .add(extractPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(extractOutputLabel).add(zpakFileLabel) .add(apkFileLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(extractPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, zpakFileInput) .add(org.jdesktop.layout.GroupLayout.LEADING, extractOutputInput) .add(org.jdesktop.layout.GroupLayout.LEADING, apkFileInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 562, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(org.jdesktop.layout.GroupLayout.TRAILING, extractProgress, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 639, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(extractButton).add(chooseOutputDir).add(chooseApkFile) .add(chooseZpakFile)))) .addContainerGap())); extractPanelLayout.setVerticalGroup(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(extractPanelLayout.createSequentialGroup().addContainerGap() .add(extractInformation, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(18, 18, 18) .add(extractPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(apkFileInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseApkFile)) .add(apkFileLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(extractPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(zpakFileInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseZpakFile)) .add(zpakFileLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(extractPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(extractPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(extractOutputInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseOutputDir)) .add(extractOutputLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 167, Short.MAX_VALUE) .add(extractPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(extractProgress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(extractButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(extractStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); extractInformation.getAccessibleContext().setAccessibleName(bundle.getString("extractDirections")); // NOI18N tabbedPane.addTab("Extract", extractPanel); chooseData.setText(bundle.getString("convert.choose")); // NOI18N chooseData.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseDataActionPerformed(evt); } }); dataInput.setToolTipText(bundle.getString("convert.extracted_data.tooltip")); // NOI18N dataLabel.setText(bundle.getString("convert.extracted_data")); // NOI18N isoLabel.setText(bundle.getString("convert.iso_input")); // NOI18N chooseIso.setText(bundle.getString("convert.choose")); // NOI18N chooseIso.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseIsoActionPerformed(evt); } }); chooseIcon.setText("Change Icon"); chooseIcon.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseIconActionPerformed(evt); } }); convertOutputLabel.setText(bundle.getString("convert.output_directory")); // NOI18N chooseConvertOutput.setText(bundle.getString("convert.choose")); // NOI18N chooseConvertOutput.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { chooseConvertOutputActionPerformed(evt); } }); loadXmlButton.setText(bundle.getString("convert.load_xml")); // NOI18N loadXmlButton.setToolTipText(bundle.getString("common.disabled_control")); // NOI18N loadXmlButton.setEnabled(false); gameInformationLabel.setText(bundle.getString("convert.game_information")); // NOI18N titleIdLabel.setText(bundle.getString("convert.title_id")); // NOI18N titleIdInput.setToolTipText(bundle.getString("convert.title_id.tooltip")); // NOI18N nameInput.setToolTipText(bundle.getString("convert.name.tooltip")); // NOI18N nameLabel.setText(bundle.getString("convert.name")); // NOI18N developerInput.setToolTipText(bundle.getString("convert.developer.tooltip")); // NOI18N developerLabel.setText(bundle.getString("convert.developer")); // NOI18N publisherLabel.setText(bundle.getString("convert.publisher")); // NOI18N publisherInput.setToolTipText(bundle.getString("convert.publisher.tooltip")); // NOI18N descriptionLabel.setText("Description:"); descriptionTextInput.setColumns(20); descriptionTextInput.setLineWrap(true); descriptionTextInput.setRows(5); descriptionTextInput.setWrapStyleWord(true); descriptionTextPane.setViewportView(descriptionTextInput); parentalRatingLabel.setText(bundle.getString("convert.parental_rating")); // NOI18N parentalRatingInput.setToolTipText(bundle.getString("convert.parental_rating.tooltip")); // NOI18N storeTypeLabel.setText(bundle.getString("convert.store_type")); // NOI18N storeTypeInput.setToolTipText(bundle.getString("convert.store_type.tooltip")); // NOI18N analogModeCheckbox.setText(bundle.getString("convert.analog_mode")); // NOI18N analogModeCheckbox.setToolTipText(bundle.getString("convert.analog_mode.tooltip")); // NOI18N convertButton.setText(bundle.getString("convert.convert")); // NOI18N convertButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { convertButtonActionPerformed(evt); } }); getTitleIdButton.setText(bundle.getString("convert.get_title_id")); // NOI18N getTitleIdButton.setToolTipText(bundle.getString("common.disabled_control")); // NOI18N getTitleIdButton.setEnabled(false); iconImagePreview.setBorder(javax.swing.BorderFactory.createEtchedBorder()); org.jdesktop.layout.GroupLayout createPanelLayout = new org.jdesktop.layout.GroupLayout(createPanel); createPanel.setLayout(createPanelLayout); createPanelLayout.setHorizontalGroup(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, createPanelLayout.createSequentialGroup() .addContainerGap() .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, convertStatus, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 739, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, createPanelLayout.createSequentialGroup().add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, createPanelLayout .createSequentialGroup() .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(isoLabel).add(dataLabel) .add(convertOutputLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(convertOutputInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE) .add(isoInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE) .add(dataInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(chooseData).add(chooseIso) .add(chooseConvertOutput))) .add(org.jdesktop.layout.GroupLayout.LEADING, convertSeparator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 552, Short.MAX_VALUE) .add(createPanelLayout.createSequentialGroup() .add(gameInformationLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 123, Short.MAX_VALUE) .add(getTitleIdButton) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(loadXmlButton)) .add(org.jdesktop.layout.GroupLayout.LEADING, createPanelLayout .createSequentialGroup() .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(nameLabel).add(developerLabel) .add(descriptionLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(descriptionTextPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 465, Short.MAX_VALUE) .add(createPanelLayout.createSequentialGroup().add( nameInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 235, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(titleIdLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(titleIdInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 160, Short.MAX_VALUE)) .add(createPanelLayout.createSequentialGroup().add( developerInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 149, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(publisherLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(publisherInput, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 238, Short.MAX_VALUE))))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(iconImagePreview, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) .add(createPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING, false) .add(org.jdesktop.layout.GroupLayout.TRAILING, chooseIcon, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(parentalRatingLabel).add(parentalRatingInput) .add(storeTypeLabel).add(storeTypeInput)) .add(analogModeCheckbox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 174, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(createPanelLayout.createSequentialGroup() .add(convertProgress, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 637, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(convertButton) .add(2, 2, 2))) .addContainerGap())); createPanelLayout.setVerticalGroup(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(createPanelLayout.createSequentialGroup().addContainerGap().add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(createPanelLayout.createSequentialGroup() .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(chooseData).add(dataInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(dataLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(isoInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseIso)) .add(isoLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(convertOutputLabel) .add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(convertOutputInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseConvertOutput))) .add(18, 18, 18) .add(convertSeparator, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 12, Short.MAX_VALUE) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(loadXmlButton).add(gameInformationLabel).add(getTitleIdButton))) .add(iconImagePreview, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 177, Short.MAX_VALUE)) .add(18, 18, 18) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(titleIdInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(titleIdLabel) .add(nameInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(chooseIcon).add(nameLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(createPanelLayout.createSequentialGroup().add(parentalRatingLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(parentalRatingInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(storeTypeLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(storeTypeInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(analogModeCheckbox)) .add(createPanelLayout.createSequentialGroup().add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(developerLabel) .add(developerInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(publisherLabel).add(publisherInput, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(createPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(descriptionTextPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 93, Short.MAX_VALUE) .add(descriptionLabel)))) .add(18, 18, 18) .add(createPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(convertButton) .add(convertProgress, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(convertStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); tabbedPane.addTab("Convert", createPanel); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(tabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(layout.createSequentialGroup() .add(tabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 528, Short.MAX_VALUE) .addContainerGap())); pack(); }
From source file:com.pianobakery.complsa.LicenseKeyGUI.java
/** * Following "Generated Code" is generated by Netbeans form editor. *///from w w w. j a v a 2 s . com @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); licenseExpirationDatejTextField = new javax.swing.JTextField(); licenseStatusjTextField = new javax.swing.JTextField(); closejButton = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); namejTextField = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); emailjTextField = new javax.swing.JTextField(); companyjTextField = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); changeProductKeyjButton = new javax.swing.JButton(); activatejButton = new javax.swing.JButton(); useTrialButton = new javax.swing.JButton(); buyButton = new javax.swing.JButton(); progressjLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Licensing"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Product License Information")); jLabel1.setText("License Status:"); jLabel2.setText("License Expiration Date:"); licenseExpirationDatejTextField.setEditable(false); licenseStatusjTextField.setEditable(false); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(licenseExpirationDatejTextField) .addComponent(licenseStatusjTextField)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(licenseStatusjTextField, 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(jLabel2).addComponent(licenseExpirationDatejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); closejButton.setText("Close"); closejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closejButtonActionPerformed(evt); } }); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Product is Licensed to")); jLabel4.setText("Name:"); namejTextField.setEditable(false); jLabel5.setText("e-mail:"); emailjTextField.setEditable(false); companyjTextField.setEditable(false); jLabel6.setText("Company:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(87, 87, 87) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(namejTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(emailjTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(companyjTextField, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(namejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(emailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6).addComponent(companyjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); changeProductKeyjButton.setText("Change Product Key"); changeProductKeyjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { changeProductKeyjButtonActionPerformed(evt); } }); useTrialButton.setText("Use 30 Day Trial"); useTrialButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { useTrialKeyButtonActionPerformed(e); } }); buyButton.setText("Buy License"); buyButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buyButtonActionPerformed(e); } }); activatejButton.setText("Activate"); activatejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { activatejButtonActionPerformed(evt); } }); progressjLabel.setForeground(Color.red); progressjLabel.setText(" "); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(progressjLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(buyButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useTrialButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(activatejButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(changeProductKeyjButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closejButton)) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(closejButton).addComponent(changeProductKeyjButton) .addComponent(activatejButton).addComponent(progressjLabel) .addComponent(useTrialButton).addComponent(buyButton)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { useTrialButton, activatejButton, changeProductKeyjButton, closejButton }); pack(); }
From source file:com.pos.spatobiz.app.view.karyawan.UbahKaryawan.java
/** This method is called from within the constructor to * initialize the form./*from ww w. j a v a2s . c o m*/ * 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() { jeniskelamin = new ButtonGroup(); labelKode = new WhiteLabel(); labelNama = new WhiteLabel(); labelTanggalLahir = new WhiteLabel(); labelAlamat = new WhiteLabel(); textKode = new TextBoxTransfer(); textNama = new TextBoxTransfer(); textTanggalLahir = new DateBox(); textAlamat = new WhiteTextArea(); errorKode = new RedLabel(); errorNama = new RedLabel(); errorTanggalLahir = new RedLabel(); errorAlamat = new RedLabel(); textTelepon = new TextBoxTransfer(); labelTelepon = new WhiteLabel(); labelEmail = new WhiteLabel(); labelJenisKelamin = new WhiteLabel(); labelPhoto = new WhiteLabel(); textEmail = new TextBoxTransfer(); radioPria = new JRadioButton(); radioWanita = new JRadioButton(); errorTelepon = new RedLabel(); errorEmail = new RedLabel(); imageChooser = new ImageChooser(); buttonBatal = new Button(); buttonUbah = new Button(); buttonCari = new Button(); setBackground(new Color(0, 0, 0)); labelKode.setHorizontalAlignment(SwingConstants.RIGHT); labelKode.setText("Kode :"); labelNama.setHorizontalAlignment(SwingConstants.RIGHT); labelNama.setText("Nama :"); labelTanggalLahir.setHorizontalAlignment(SwingConstants.RIGHT); labelTanggalLahir.setText("Tanggal Lahir :"); labelAlamat.setHorizontalAlignment(SwingConstants.RIGHT); labelAlamat.setText("Alamat :"); textTanggalLahir.setFormatterFactory( new DefaultFormatterFactory(new DateFormatter(DateFormat.getDateInstance(DateFormat.LONG)))); textTanggalLahir.setPreferredSize(new Dimension(120, 24)); textTanggalLahir.setValue(new Date()); errorKode.setText("error kode"); errorNama.setText("error nama"); errorTanggalLahir.setText("error tanggal lahir"); errorAlamat.setText("error alamat"); labelTelepon.setHorizontalAlignment(SwingConstants.RIGHT); labelTelepon.setText("Telepon :"); labelEmail.setHorizontalAlignment(SwingConstants.RIGHT); labelEmail.setText("Email :"); labelJenisKelamin.setHorizontalAlignment(SwingConstants.RIGHT); labelJenisKelamin.setText("Jenis Kelamin :"); labelPhoto.setHorizontalAlignment(SwingConstants.RIGHT); labelPhoto.setText("Photo :"); jeniskelamin.add(radioPria); radioPria.setFont(new Font("Tahoma", 1, 11)); radioPria.setForeground(new Color(255, 255, 255)); radioPria.setSelected(true); radioPria.setText("Pria"); radioPria.setOpaque(false); jeniskelamin.add(radioWanita); radioWanita.setFont(new Font("Tahoma", 1, 11)); radioWanita.setForeground(new Color(255, 255, 255)); radioWanita.setText("Wanita"); radioWanita.setOpaque(false); errorTelepon.setText("error telepon"); errorEmail.setText("error email"); buttonBatal.setMnemonic('B'); buttonBatal.setText("Batal"); buttonUbah.setMnemonic('U'); buttonUbah.setText("Ubah"); buttonCari.setText("Cari"); GroupLayout layout = new GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.LEADING) .addGroup(layout.createParallelGroup(Alignment.TRAILING, false) .addComponent(labelPhoto, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelJenisKelamin, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelEmail, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(layout.createParallelGroup(Alignment.TRAILING, false) .addComponent(labelTelepon, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(labelKode, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(Alignment.TRAILING) .addComponent(textAlamat, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textNama, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textTanggalLahir, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addComponent(textTelepon, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addGroup(Alignment.LEADING, layout.createSequentialGroup().addComponent(radioPria) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(radioWanita)) .addComponent(imageChooser, Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 253, GroupLayout.PREFERRED_SIZE) .addComponent(textEmail, GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(textKode, GroupLayout.DEFAULT_SIZE, 339, Short.MAX_VALUE) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGap(4, 4, 4) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addGroup(Alignment.TRAILING, layout.createSequentialGroup() .addComponent(buttonUbah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(ComponentPlacement.RELATED).addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout .createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorKode, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(buttonCari, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorNama, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTanggalLahir, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(labelAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textAlamat, GroupLayout.PREFERRED_SIZE, 88, GroupLayout.PREFERRED_SIZE) .addComponent(errorAlamat, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(textTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(labelTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorTelepon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(textEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(errorEmail, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(labelJenisKelamin, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(radioPria).addComponent(radioWanita)) .addPreferredGap(ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(Alignment.LEADING) .addComponent(labelPhoto, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(imageChooser, GroupLayout.PREFERRED_SIZE, 189, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(Alignment.BASELINE) .addComponent(buttonBatal, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(buttonUbah, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap())); }