List of usage examples for javax.swing.table TableColumnModel getColumn
public TableColumn getColumn(int columnIndex);
TableColumn
object for the column at columnIndex
. From source file:com.osparking.attendant.AttListForm.java
private void SetTableColumnWidth() { usersTable.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); TableColumnModel tcm = usersTable.getColumnModel(); // Adjust column width one by one // Adjust email address column width tcm.getColumn(2).setCellRenderer(putCellCenter); SetAColumnWidth(tcm.getColumn(0), 10, 80, 500); // 0: User ID SetAColumnWidth(tcm.getColumn(1), 10, 80, 500); // 1: User name SetAColumnWidth(tcm.getColumn(2), 10, 60, 500); // 2: Is Administrator or not SetAColumnWidth(tcm.getColumn(3), 10, 100, 32767); // 2: Cell Phone SetAColumnWidth(tcm.getColumn(4), 10, 100, 32767); // 3: Phone number SetAColumnWidth(tcm.getColumn(5), 10, 120, 32767); // 5: E-mail address SetAColumnWidth(tcm.getColumn(6), 10, 120, 32767); // 6: Latest modification date and time }
From source file:com.osparking.attendant.AttListForm.java
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor./* w w w . ja v a 2 s. c om*/ */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; saveFileChooser = new javax.swing.JFileChooser(); requiredNotice = new javax.swing.JLabel(); filler40 = new javax.swing.Box.Filler(new java.awt.Dimension(40, 0), new java.awt.Dimension(40, 0), new java.awt.Dimension(40, 32767)); topPanel = new javax.swing.JPanel(); wholePanel = new javax.swing.JPanel(); westPanel = new javax.swing.JPanel(); metaKeyPanel = new javax.swing.JPanel(); modePanel = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); modeString = new javax.swing.JLabel(); jSeparator1 = new javax.swing.JSeparator(); RequiredPanel1 = new javax.swing.JPanel(); legendLLabel = new javax.swing.JLabel(); filler42 = new javax.swing.Box.Filler(new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 0), new java.awt.Dimension(20, 32767)); sym_1 = new javax.swing.JLabel(); legend_1 = new javax.swing.JLabel(); sym_2 = new javax.swing.JLabel(); legend_2 = new javax.swing.JLabel(); jSeparator2 = new javax.swing.JSeparator(); userDetailsPanel = new javax.swing.JPanel(); userIDLabel = new javax.swing.JLabel(); isIDreqLabel = new javax.swing.JLabel(); userIDText = new javax.swing.JTextField(); checkIDButton = new javax.swing.JButton(); adminAuthLabel = new javax.swing.JLabel(); managerCheckBox = new javax.swing.JCheckBox(); managerHelpButton = new javax.swing.JButton(); nameLabel = new javax.swing.JLabel(); nameReqLabel = new javax.swing.JLabel(); userNameText = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); cellReqLabel = new javax.swing.JLabel(); cellPhoneText = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); phoneReqLabel = new javax.swing.JLabel(); phoneText = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); emailAddrText = new javax.swing.JTextField(); checkEmailButton = new javax.swing.JButton(); changePWLabel = new javax.swing.JLabel(); changePWCheckBox = new javax.swing.JCheckBox(); newPW1Label = new javax.swing.JLabel(); newPW1ReqLabel = new javax.swing.JLabel(); new1Password = new javax.swing.JPasswordField(); PWHelpButton = new javax.swing.JButton(); newPW2Label = new javax.swing.JLabel(); newPW2ReqLabel = new javax.swing.JLabel(); new2Password = new javax.swing.JPasswordField(); userPWLabel = new javax.swing.JLabel(); userPWReqLabel = new javax.swing.JLabel(); userPassword = new javax.swing.JPasswordField(); createDate = new javax.swing.JLabel(); creationDateText = new javax.swing.JTextField(); centerPanel = new javax.swing.JPanel(); titlePanel = new javax.swing.JPanel(); attendantGUI_title = new javax.swing.JLabel(); topInPanel2 = new javax.swing.JPanel(); adminAuth2CheckBox = new javax.swing.JCheckBox(); listTopPanel = new javax.swing.JPanel(); countLabel = new javax.swing.JLabel(); countValue = new javax.swing.JLabel(); topUserIdLabel = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); usersTable = new javax.swing.JTable() { public boolean isCellEditable(int rowIndex, int colIndex) { return false; //Disallow the editing of any cell } }; southPanel = new javax.swing.JPanel(); spacePanel1 = new javax.swing.JPanel(); btnPanel = new javax.swing.JPanel(); createButton = new javax.swing.JButton(); filler71 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 32767)); multiFuncButton = new javax.swing.JButton(); filler72 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 32767)); deleteButton = new javax.swing.JButton(); filler73 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 32767)); cancelButton = new javax.swing.JButton(); filler22 = new javax.swing.Box.Filler(new java.awt.Dimension(15, 0), new java.awt.Dimension(90, 0), new java.awt.Dimension(32767, 32767)); searchPanel = new javax.swing.JPanel(); searchCriteriaComboBox = new javax.swing.JComboBox(); searchText = new javax.swing.JTextField(); searchButton = new javax.swing.JButton(); filler81 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 32767)); saveOdsButton = new javax.swing.JButton(); filler82 = new javax.swing.Box.Filler(new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 10), new java.awt.Dimension(10, 32767)); closeFormButton = new javax.swing.JButton(); bottomPanel = new javax.swing.JPanel(); filler3 = new javax.swing.Box.Filler(new java.awt.Dimension(40, 0), new java.awt.Dimension(40, 0), new java.awt.Dimension(40, 32767)); saveFileChooser.setDialogType(javax.swing.JFileChooser.SAVE_DIALOG); saveFileChooser.setApproveButtonText(SAVE_BTN.getContent()); saveFileChooser.setCurrentDirectory(ODS_DIRECTORY); saveFileChooser.setDialogTitle(ATTENDANT_ODS_TITLE.getContent()); saveFileChooser.setFileFilter(new OdsFileOnly()); saveFileChooser.setToolTipText(""); saveFileChooser.setEnabled(false); saveFileChooser.setName(""); // NOI18N requiredNotice.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); requiredNotice.setText("X: Reauired, O : 1"); requiredNotice.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); requiredNotice.setMaximumSize(new java.awt.Dimension(80, 21)); requiredNotice.setMinimumSize(new java.awt.Dimension(80, 21)); requiredNotice.setPreferredSize(new java.awt.Dimension(80, 21)); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle(ATTLIST_FRAME_TITLE.getContent()); setMinimumSize(new Dimension(normGUIwidth, normGUIheight)); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); getContentPane().add(filler40, java.awt.BorderLayout.WEST); topPanel.setMinimumSize(new java.awt.Dimension(267, 40)); topPanel.setPreferredSize(new java.awt.Dimension(267, 40)); javax.swing.GroupLayout topPanelLayout = new javax.swing.GroupLayout(topPanel); topPanel.setLayout(topPanelLayout); topPanelLayout.setHorizontalGroup(topPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1022, Short.MAX_VALUE)); topPanelLayout.setVerticalGroup(topPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 40, Short.MAX_VALUE)); getContentPane().add(topPanel, java.awt.BorderLayout.NORTH); wholePanel.setMinimumSize(new java.awt.Dimension(400, 670)); wholePanel.setPreferredSize(new java.awt.Dimension(400, 670)); wholePanel.setLayout(new java.awt.BorderLayout(20, 0)); westPanel.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); westPanel.setMinimumSize(new java.awt.Dimension(330, 540)); westPanel.setPreferredSize(new java.awt.Dimension(330, 540)); westPanel.setLayout(new javax.swing.BoxLayout(westPanel, javax.swing.BoxLayout.PAGE_AXIS)); metaKeyPanel.setMinimumSize(new java.awt.Dimension(0, 26)); metaKeyPanel.setPreferredSize(new java.awt.Dimension(0, 26)); metaKeyPanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 0, 0)); westPanel.add(metaKeyPanel); modePanel.setMaximumSize(new java.awt.Dimension(32767, 28)); modePanel.setMinimumSize(new java.awt.Dimension(300, 26)); modePanel.setPreferredSize(new java.awt.Dimension(300, 26)); jLabel2.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel2.setText(MODE_LABEL.getContent()); jLabel2.setMaximumSize(new java.awt.Dimension(200, 28)); jLabel2.setMinimumSize(new java.awt.Dimension(50, 26)); jLabel2.setPreferredSize(new java.awt.Dimension(80, 26)); modeString.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); modeString.setForeground(pointColor); modeString.setText(SEARCH.getContent()); modeString.setMaximumSize(new java.awt.Dimension(200, 28)); modeString.setMinimumSize(new java.awt.Dimension(34, 26)); modeString.setPreferredSize(new java.awt.Dimension(80, 26)); javax.swing.GroupLayout modePanelLayout = new javax.swing.GroupLayout(modePanel); modePanel.setLayout(modePanelLayout); modePanelLayout .setHorizontalGroup(modePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(modePanelLayout.createSequentialGroup() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(5, 5, 5).addComponent(modeString, javax.swing.GroupLayout.PREFERRED_SIZE, 198, javax.swing.GroupLayout.PREFERRED_SIZE))); modePanelLayout.setVerticalGroup(modePanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, modePanelLayout.createSequentialGroup() .addGap(0, 0, 0) .addGroup(modePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(modeString, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); westPanel.add(modePanel); jSeparator1.setMaximumSize(new java.awt.Dimension(32767, 5)); jSeparator1.setMinimumSize(new java.awt.Dimension(0, 5)); jSeparator1.setPreferredSize(new java.awt.Dimension(0, 5)); westPanel.add(jSeparator1); RequiredPanel1.setMaximumSize(new java.awt.Dimension(32877, 1024)); RequiredPanel1.setMinimumSize(new java.awt.Dimension(300, 26)); RequiredPanel1.setPreferredSize(new java.awt.Dimension(300, 26)); RequiredPanel1.setLayout(new javax.swing.BoxLayout(RequiredPanel1, javax.swing.BoxLayout.LINE_AXIS)); legendLLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); legendLLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); legendLLabel.setText(DATA_COND.getContent()); legendLLabel.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); legendLLabel.setMaximumSize(new java.awt.Dimension(130, 21)); legendLLabel.setMinimumSize(new java.awt.Dimension(130, 21)); legendLLabel.setName(""); // NOI18N legendLLabel.setPreferredSize(new java.awt.Dimension(130, 21)); RequiredPanel1.add(legendLLabel); RequiredPanel1.add(filler42); sym_1.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); sym_1.setForeground(new java.awt.Color(255, 0, 0)); sym_1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); sym_1.setText("*"); sym_1.setMaximumSize(new java.awt.Dimension(16, 30)); sym_1.setMinimumSize(new java.awt.Dimension(16, 21)); sym_1.setPreferredSize(new java.awt.Dimension(16, 21)); RequiredPanel1.add(sym_1); legend_1.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); legend_1.setText(REQUIRED1_LABEL.getContent() + ", "); legend_1.setMaximumSize(new java.awt.Dimension(80, 30)); legend_1.setMinimumSize(new java.awt.Dimension(40, 21)); legend_1.setName(""); // NOI18N legend_1.setPreferredSize(new java.awt.Dimension(40, 21)); resizeComponentFor(legend_1, REQUIRED1_LABEL.getContent() + ", "); RequiredPanel1.add(legend_1); sym_2.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); sym_2.setForeground(new java.awt.Color(0, 0, 255)); sym_2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); sym_2.setText("*"); sym_2.setMaximumSize(new java.awt.Dimension(16, 30)); sym_2.setMinimumSize(new java.awt.Dimension(16, 21)); sym_2.setPreferredSize(new java.awt.Dimension(16, 21)); RequiredPanel1.add(sym_2); legend_2.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); legend_2.setText(REQUIRED2_LABEL.getContent()); legend_2.setMaximumSize(new java.awt.Dimension(320, 30)); legend_2.setMinimumSize(new java.awt.Dimension(50, 21)); legend_2.setName(""); // NOI18N legend_2.setPreferredSize(new java.awt.Dimension(50, 21)); RequiredPanel1.add(legend_2); westPanel.add(RequiredPanel1); jSeparator2.setMaximumSize(new java.awt.Dimension(32767, 2)); jSeparator2.setMinimumSize(new java.awt.Dimension(0, 2)); westPanel.add(jSeparator2); userDetailsPanel.setMinimumSize(new java.awt.Dimension(320, 318)); userDetailsPanel.setPreferredSize(new java.awt.Dimension(320, 337)); java.awt.GridBagLayout userDetailsPanelLayout = new java.awt.GridBagLayout(); userDetailsPanelLayout.columnWidths = new int[] { 0, 5, 0, 5, 0, 5, 0 }; userDetailsPanelLayout.rowHeights = new int[] { 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0, 5, 0 }; userDetailsPanel.setLayout(userDetailsPanelLayout); userIDLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); userIDLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); userIDLabel.setText(LOGIN_ID_LABEL.getContent()); userIDLabel.setMaximumSize(new java.awt.Dimension(130, 26)); userIDLabel.setMinimumSize(new java.awt.Dimension(130, 26)); userIDLabel.setPreferredSize(new java.awt.Dimension(130, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(userIDLabel, gridBagConstraints); isIDreqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); isIDreqLabel.setForeground(new java.awt.Color(255, 0, 0)); isIDreqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); isIDreqLabel.setText("*"); isIDreqLabel.setToolTipText(""); isIDreqLabel.setEnabled(false); isIDreqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); isIDreqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); isIDreqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; userDetailsPanel.add(isIDreqLabel, gridBagConstraints); userIDText.setEditable(false); userIDText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); userIDText.setToolTipText(ID_INPUT_TOOLTIP.getContent()); userIDText.setDisabledTextColor(new java.awt.Color(102, 102, 102)); userIDText.setEnabled(false); userIDText.setMaximumSize(new java.awt.Dimension(32767, 30)); userIDText.setMinimumSize(new Dimension(carTagWidth, 30)); userIDText.setPreferredSize(new Dimension(carTagWidth, 30)); userIDText.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { userIDTextFocusGained(evt); } }); userIDText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { newIDtyped(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(userIDText, gridBagConstraints); checkIDButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); checkIDButton.setMnemonic('K'); checkIDButton.setText(ID_CHECK_BTN.getContent()); checkIDButton.setToolTipText(CHK_DUP_ID_TIP.getContent()); checkIDButton.setEnabled(false); checkIDButton.setMaximumSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkIDButton.setMinimumSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkIDButton.setPreferredSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkIDButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkIDButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; userDetailsPanel.add(checkIDButton, gridBagConstraints); adminAuthLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); adminAuthLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); adminAuthLabel.setText(MANAGER_HEADER.getContent()); adminAuthLabel.setToolTipText(""); adminAuthLabel.setMaximumSize(new java.awt.Dimension(130, 21)); adminAuthLabel.setMinimumSize(new java.awt.Dimension(130, 21)); adminAuthLabel.setPreferredSize(new java.awt.Dimension(130, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(adminAuthLabel, gridBagConstraints); managerCheckBox.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); managerCheckBox.setEnabled(false); managerCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); managerCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { managerCheckBoxActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; userDetailsPanel.add(managerCheckBox, gridBagConstraints); managerHelpButton.setBackground(new java.awt.Color(153, 255, 153)); managerHelpButton.setFont(new java.awt.Font("Dotum", 1, 14)); // NOI18N managerHelpButton.setIcon(getQuest20_Icon()); managerHelpButton.setEnabled(false); managerHelpButton.setIconTextGap(0); managerHelpButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); managerHelpButton.setMaximumSize(new java.awt.Dimension(20, 20)); managerHelpButton.setMinimumSize(new java.awt.Dimension(20, 20)); managerHelpButton.setOpaque(false); managerHelpButton.setPreferredSize(new java.awt.Dimension(20, 20)); managerHelpButton.setRequestFocusEnabled(false); managerHelpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { managerHelpButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 4; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5); userDetailsPanel.add(managerHelpButton, gridBagConstraints); nameLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); nameLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); nameLabel.setText(NAME_LABEL.getContent()); nameLabel.setMaximumSize(new java.awt.Dimension(130, 26)); nameLabel.setMinimumSize(new java.awt.Dimension(130, 26)); nameLabel.setPreferredSize(new java.awt.Dimension(130, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(nameLabel, gridBagConstraints); nameReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); nameReqLabel.setForeground(new java.awt.Color(255, 0, 0)); nameReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); nameReqLabel.setText("*"); nameReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); nameReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); nameReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 6; userDetailsPanel.add(nameReqLabel, gridBagConstraints); userNameText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); userNameText.setToolTipText(NAME_INPUT_TOOLTIP.getContent()); userNameText.setEnabled(false); userNameText.setMaximumSize(new java.awt.Dimension(32767, 30)); userNameText.setMinimumSize(new Dimension(carTagWidth, 30)); userNameText.setName(""); // NOI18N userNameText.setPreferredSize(new Dimension(carTagWidth, 30)); userNameText.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { userNameTextFocusGained(evt); } }); userNameText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { userNameTextKeyReleased(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(userNameText, gridBagConstraints); jLabel5.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel5.setText(CELL_PHONE_LABEL.getContent()); jLabel5.setToolTipText(CELL_PHONE_TOOLTIP.getContent()); jLabel5.setMaximumSize(new java.awt.Dimension(130, 21)); jLabel5.setMinimumSize(new java.awt.Dimension(130, 21)); jLabel5.setPreferredSize(new java.awt.Dimension(130, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(jLabel5, gridBagConstraints); cellReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); cellReqLabel.setForeground(new java.awt.Color(0, 0, 255)); cellReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); cellReqLabel.setText("*"); cellReqLabel.setToolTipText(CELL_PHONE_TOOLTIP.getContent()); cellReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); cellReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); cellReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 8; userDetailsPanel.add(cellReqLabel, gridBagConstraints); cellPhoneText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); cellPhoneText.setToolTipText(CELL_INPUT_TOOLTIP.getContent()); cellPhoneText.setEnabled(false); cellPhoneText.setMaximumSize(new java.awt.Dimension(32767, 30)); cellPhoneText.setMinimumSize(new Dimension(carTagWidth, 30)); cellPhoneText.setPreferredSize(new Dimension(carTagWidth, 30)); cellPhoneText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { cellPhoneTextKeyReleased(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 8; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(cellPhoneText, gridBagConstraints); jLabel6.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel6.setText(PHONE_LABEL.getContent()); jLabel6.setToolTipText(CELL_PHONE_TOOLTIP.getContent()); jLabel6.setMaximumSize(new java.awt.Dimension(130, 21)); jLabel6.setMinimumSize(new java.awt.Dimension(130, 21)); jLabel6.setPreferredSize(new java.awt.Dimension(130, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 10; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(jLabel6, gridBagConstraints); phoneReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); phoneReqLabel.setForeground(new java.awt.Color(0, 0, 255)); phoneReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); phoneReqLabel.setText("*"); phoneReqLabel.setToolTipText(CELL_PHONE_TOOLTIP.getContent()); phoneReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); phoneReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); phoneReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 10; userDetailsPanel.add(phoneReqLabel, gridBagConstraints); phoneText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); phoneText.setToolTipText(PHONE_INPUT_TOOLTIP.getContent()); phoneText.setEnabled(false); phoneText.setMaximumSize(new java.awt.Dimension(32767, 30)); phoneText.setMinimumSize(new Dimension(carTagWidth, 30)); phoneText.setPreferredSize(new Dimension(carTagWidth, 30)); phoneText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { phoneTextKeyReleased(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 10; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(phoneText, gridBagConstraints); jLabel4.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jLabel4.setText(EMAIL_LABEL.getContent()); jLabel4.setMaximumSize(new java.awt.Dimension(130, 30)); jLabel4.setMinimumSize(new java.awt.Dimension(130, 30)); jLabel4.setPreferredSize(new java.awt.Dimension(130, 30)); jLabel4.setRequestFocusEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 12; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(jLabel4, gridBagConstraints); emailAddrText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); emailAddrText.setHorizontalAlignment(javax.swing.JTextField.LEFT); emailAddrText.setToolTipText(EMAIL_TOOLTIP.getContent() + "userID@company.com"); emailAddrText.setEnabled(false); emailAddrText.setMaximumSize(new java.awt.Dimension(32767, 30)); emailAddrText.setMinimumSize(new java.awt.Dimension(140, 30)); emailAddrText.setPreferredSize(new java.awt.Dimension(140, 30)); emailAddrText.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { emailAddrTextFocusGained(evt); } }); emailAddrText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { emailAddrTextKeyReleased(evt); } public void keyTyped(java.awt.event.KeyEvent evt) { EmailTypedHandler(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 12; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(emailAddrText, gridBagConstraints); checkEmailButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); checkEmailButton.setMnemonic('L'); checkEmailButton.setText(EMAIL_CHECK_BTN.getContent()); checkEmailButton.setToolTipText(CHK_E_MAIL_TIP.getContent()); checkEmailButton.setEnabled(false); checkEmailButton.setMaximumSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkEmailButton.setMinimumSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkEmailButton.setPreferredSize(new Dimension(buttonWidthWide, buttonHeightShort)); checkEmailButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { checkEmailButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 14; userDetailsPanel.add(checkEmailButton, gridBagConstraints); changePWLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); changePWLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); changePWLabel.setText(CHANGE_PW_LABEL.getContent()); changePWLabel.setMaximumSize(new java.awt.Dimension(130, 21)); changePWLabel.setMinimumSize(new java.awt.Dimension(130, 21)); changePWLabel.setPreferredSize(new java.awt.Dimension(130, 21)); changePWLabel.setRequestFocusEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 16; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(changePWLabel, gridBagConstraints); changePWCheckBox.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); changePWCheckBox.setEnabled(false); changePWCheckBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { changePWCheckBoxActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 16; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; userDetailsPanel.add(changePWCheckBox, gridBagConstraints); newPW1Label.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); newPW1Label.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); newPW1Label.setText(NEW_PW_LABLE.getContent()); newPW1Label.setMaximumSize(new java.awt.Dimension(150, 21)); newPW1Label.setMinimumSize(new java.awt.Dimension(150, 21)); newPW1Label.setPreferredSize(new java.awt.Dimension(150, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 18; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_END; userDetailsPanel.add(newPW1Label, gridBagConstraints); newPW1ReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); newPW1ReqLabel.setForeground(new java.awt.Color(255, 0, 0)); newPW1ReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); newPW1ReqLabel.setText("*"); newPW1ReqLabel.setToolTipText(""); newPW1ReqLabel.setEnabled(false); newPW1ReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); newPW1ReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); newPW1ReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 18; userDetailsPanel.add(newPW1ReqLabel, gridBagConstraints); new1Password.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); new1Password.setToolTipText(showPasswordRequirement()); new1Password.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); new1Password.setEnabled(false); new1Password.setMaximumSize(new java.awt.Dimension(32767, 30)); new1Password.setMinimumSize(new Dimension(carTagWidth, 30)); new1Password.setNextFocusableComponent(new2Password); new1Password.setPreferredSize(new Dimension(carTagWidth, 30)); new1Password.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { new1PasswordFocusGained(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 18; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(new1Password, gridBagConstraints); PWHelpButton.setBackground(new java.awt.Color(153, 255, 153)); PWHelpButton.setFont(new java.awt.Font("Dotum", 1, 14)); // NOI18N PWHelpButton.setIcon(getQuest20_Icon()); PWHelpButton.setEnabled(false); PWHelpButton.setIconTextGap(0); PWHelpButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); PWHelpButton.setMaximumSize(new java.awt.Dimension(20, 20)); PWHelpButton.setMinimumSize(new java.awt.Dimension(20, 20)); PWHelpButton.setOpaque(false); PWHelpButton.setPreferredSize(new java.awt.Dimension(20, 20)); PWHelpButton.setRequestFocusEnabled(false); PWHelpButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { PWHelpButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 18; gridBagConstraints.anchor = java.awt.GridBagConstraints.LINE_START; gridBagConstraints.insets = new java.awt.Insets(0, 0, 0, 5); userDetailsPanel.add(PWHelpButton, gridBagConstraints); newPW2Label.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); newPW2Label.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); newPW2Label.setText(REPEAT_PW_LABEL.getContent()); newPW2Label.setMaximumSize(new java.awt.Dimension(150, 21)); newPW2Label.setMinimumSize(new java.awt.Dimension(150, 21)); newPW2Label.setPreferredSize(new java.awt.Dimension(150, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 20; userDetailsPanel.add(newPW2Label, gridBagConstraints); newPW2ReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); newPW2ReqLabel.setForeground(new java.awt.Color(255, 0, 0)); newPW2ReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); newPW2ReqLabel.setText("*"); newPW2ReqLabel.setToolTipText(""); newPW2ReqLabel.setEnabled(false); newPW2ReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); newPW2ReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); newPW2ReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 20; userDetailsPanel.add(newPW2ReqLabel, gridBagConstraints); new2Password.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); new2Password.setToolTipText(REPEAT_PW_INPUT_TOOLTIP.getContent()); new2Password.setEnabled(false); new2Password.setMaximumSize(new java.awt.Dimension(32767, 30)); new2Password.setMinimumSize(new Dimension(carTagWidth, 30)); new2Password.setPreferredSize(new Dimension(carTagWidth, 30)); new2Password.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { new2PasswordFocusGained(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 20; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(new2Password, gridBagConstraints); userPWLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); userPWLabel.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); userPWLabel.setText(MY_PW_LABEL.getContent()); userPWLabel.setMaximumSize(new java.awt.Dimension(150, 21)); userPWLabel.setMinimumSize(new java.awt.Dimension(150, 21)); userPWLabel.setPreferredSize(new java.awt.Dimension(150, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 22; userDetailsPanel.add(userPWLabel, gridBagConstraints); userPWReqLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size + 3)); userPWReqLabel.setForeground(new java.awt.Color(255, 0, 0)); userPWReqLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); userPWReqLabel.setText("*"); userPWReqLabel.setEnabled(false); userPWReqLabel.setMaximumSize(new java.awt.Dimension(24, 26)); userPWReqLabel.setMinimumSize(new java.awt.Dimension(24, 21)); userPWReqLabel.setPreferredSize(new java.awt.Dimension(24, 26)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 22; userDetailsPanel.add(userPWReqLabel, gridBagConstraints); userPassword.setEditable(false); userPassword.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); userPassword.setToolTipText(""); userPassword.setEnabled(false); userPassword.setMaximumSize(new java.awt.Dimension(32767, 30)); userPassword.setMinimumSize(new Dimension(carTagWidth, 30)); userPassword.setPreferredSize(new Dimension(carTagWidth, 30)); userPassword.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { userPasswordFocusGained(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 22; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(userPassword, gridBagConstraints); createDate.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); createDate.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); createDate.setText(CREATION_LABEL.getContent()); createDate.setMaximumSize(new java.awt.Dimension(150, 21)); createDate.setMinimumSize(new java.awt.Dimension(150, 21)); createDate.setPreferredSize(new java.awt.Dimension(150, 21)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 24; userDetailsPanel.add(createDate, gridBagConstraints); creationDateText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); creationDateText.setToolTipText(""); creationDateText.setEnabled(false); creationDateText.setMaximumSize(new java.awt.Dimension(32767, 30)); creationDateText.setMinimumSize(new Dimension(carTagWidth, 30)); creationDateText.setPreferredSize(new Dimension(carTagWidth, 30)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 24; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; userDetailsPanel.add(creationDateText, gridBagConstraints); westPanel.add(userDetailsPanel); wholePanel.add(westPanel, java.awt.BorderLayout.WEST); centerPanel.setMinimumSize(new java.awt.Dimension(600, 540)); centerPanel.setPreferredSize(new java.awt.Dimension(600, 540)); centerPanel.setLayout(new javax.swing.BoxLayout(centerPanel, javax.swing.BoxLayout.Y_AXIS)); titlePanel.setMaximumSize(new java.awt.Dimension(32767, 26)); titlePanel.setMinimumSize(new java.awt.Dimension(267, 26)); titlePanel.setPreferredSize(new java.awt.Dimension(267, 26)); titlePanel.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.CENTER, 0, 0)); attendantGUI_title.setFont(new java.awt.Font(font_Type, font_Style, head_font_Size)); attendantGUI_title.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); attendantGUI_title.setText(ATTLIST_FRAME_TITLE.getContent()); titlePanel.add(attendantGUI_title); centerPanel.add(titlePanel); topInPanel2.setMaximumSize(new java.awt.Dimension(32767, 26)); topInPanel2.setMinimumSize(new java.awt.Dimension(267, 26)); topInPanel2.setPreferredSize(new java.awt.Dimension(267, 26)); adminAuth2CheckBox.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); adminAuth2CheckBox.setText(MANAGER_HEADER.getContent()); adminAuth2CheckBox.setToolTipText(""); adminAuth2CheckBox.setEnabled(false); adminAuth2CheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); adminAuth2CheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); javax.swing.GroupLayout topInPanel2Layout = new javax.swing.GroupLayout(topInPanel2); topInPanel2.setLayout(topInPanel2Layout); topInPanel2Layout.setHorizontalGroup( topInPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup( javax.swing.GroupLayout.Alignment.TRAILING, topInPanel2Layout.createSequentialGroup() .addContainerGap(491, Short.MAX_VALUE).addComponent(adminAuth2CheckBox))); topInPanel2Layout .setVerticalGroup(topInPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, topInPanel2Layout .createSequentialGroup().addGap(0, 0, 0).addComponent(adminAuth2CheckBox))); centerPanel.add(topInPanel2); listTopPanel.setMaximumSize(new java.awt.Dimension(32767, 30)); listTopPanel.setPreferredSize(new java.awt.Dimension(76, 30)); countLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); countLabel.setText(COUNT_LABEL.getContent()); countValue.setForeground(pointColor); countValue.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); countValue.setText("0"); topUserIdLabel.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); topUserIdLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); topUserIdLabel.setText(LOGIN_ID_LABEL.getContent() + ": " + loginID); topUserIdLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); topUserIdLabel.setMaximumSize(new java.awt.Dimension(20000, 26)); topUserIdLabel.setMinimumSize(new java.awt.Dimension(80, 26)); topUserIdLabel.setPreferredSize(new java.awt.Dimension(80, 26)); javax.swing.GroupLayout listTopPanelLayout = new javax.swing.GroupLayout(listTopPanel); listTopPanel.setLayout(listTopPanelLayout); listTopPanelLayout.setHorizontalGroup(listTopPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(listTopPanelLayout.createSequentialGroup().addGap(1, 1, 1) .addComponent(countLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(countValue, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 398, Short.MAX_VALUE) .addComponent(topUserIdLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); listTopPanelLayout.setVerticalGroup(listTopPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(listTopPanelLayout.createSequentialGroup().addGap(0, 0, 0) .addGroup(listTopPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(countLabel).addComponent(countValue).addComponent(topUserIdLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); centerPanel.add(listTopPanel); jScrollPane1.setMinimumSize(new java.awt.Dimension(603, 474)); jScrollPane1.setName(""); // NOI18N jScrollPane1.setPreferredSize(new java.awt.Dimension(603, 0)); usersTable.setAutoCreateRowSorter(true); usersTable.setFont(new java.awt.Font(font_Type, 0, font_Size)); usersTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null }, }, new String[] { USER_ID_HEADER.getContent(), NAME_HEADER.getContent(), MANAGER_HEADER.getContent(), CELL_PHONE_HEADER.getContent(), PHONE_HEADER.getContent(), EMAIL_HEADER.getContent(), CREATED_HEADER.getContent(), MODIFIED_HEADER.getContent() })); TableColumnModel utcm = usersTable.getColumnModel(); utcm.removeColumn(utcm.getColumn(6)); usersTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); usersTable.setFillsViewportHeight(true); usersTable.setFocusCycleRoot(true); usersTable.setMaximumSize(new java.awt.Dimension(32767, 32767)); usersTable.setMinimumSize(new java.awt.Dimension(600, 0)); usersTable.setName(""); // NOI18N usersTable.setNextFocusableComponent(userNameText); usersTable.setPreferredSize(new java.awt.Dimension(600, 0)); usersTable.setRowHeight(tableRowHeight); ((DefaultTableCellRenderer) usersTable.getTableHeader().getDefaultRenderer()) .setHorizontalAlignment(JLabel.CENTER); jScrollPane1.setViewportView(usersTable); centerPanel.add(jScrollPane1); wholePanel.add(centerPanel, java.awt.BorderLayout.CENTER); southPanel.setMinimumSize(new java.awt.Dimension(980, 55)); southPanel.setPreferredSize(new java.awt.Dimension(980, 55)); southPanel.setLayout(new javax.swing.BoxLayout(southPanel, javax.swing.BoxLayout.PAGE_AXIS)); spacePanel1.setMaximumSize(new java.awt.Dimension(32767, 15)); spacePanel1.setMinimumSize(new java.awt.Dimension(0, 15)); spacePanel1.setPreferredSize(new java.awt.Dimension(980, 15)); javax.swing.GroupLayout spacePanel1Layout = new javax.swing.GroupLayout(spacePanel1); spacePanel1.setLayout(spacePanel1Layout); spacePanel1Layout.setHorizontalGroup(spacePanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 942, Short.MAX_VALUE)); spacePanel1Layout.setVerticalGroup(spacePanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 15, Short.MAX_VALUE)); southPanel.add(spacePanel1); btnPanel.setMaximumSize(new java.awt.Dimension(33747, 40)); btnPanel.setMinimumSize(new java.awt.Dimension(980, 40)); btnPanel.setPreferredSize(new java.awt.Dimension(980, 40)); btnPanel.setLayout(new javax.swing.BoxLayout(btnPanel, javax.swing.BoxLayout.LINE_AXIS)); createButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); createButton.setMnemonic('r'); createButton.setText(CREATE_BTN.getContent()); createButton.setEnabled(false); createButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); createButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); createButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); createButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); createButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createButtonActionPerformed(evt); } }); btnPanel.add(createButton); btnPanel.add(filler71); multiFuncButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); multiFuncButton.setMnemonic('m'); multiFuncButton.setText(MODIFY_BTN.getContent()); multiFuncButton.setEnabled(false); multiFuncButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); multiFuncButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); multiFuncButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); multiFuncButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); multiFuncButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { multiFuncButtonActionPerformed(evt); } }); btnPanel.add(multiFuncButton); btnPanel.add(filler72); deleteButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); deleteButton.setMnemonic('d'); deleteButton.setText(DELETE_BTN.getContent()); deleteButton.setEnabled(false); deleteButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); deleteButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); deleteButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); deleteButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); deleteButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { deleteButtonActionPerformed(evt); } }); btnPanel.add(deleteButton); btnPanel.add(filler73); cancelButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); cancelButton.setMnemonic('c'); cancelButton.setText(CANCEL_BTN.getContent()); cancelButton.setEnabled(false); cancelButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); cancelButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); cancelButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); cancelButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); cancelButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cancelButtonActionPerformed(evt); } }); btnPanel.add(cancelButton); btnPanel.add(filler22); searchPanel.setBackground(new java.awt.Color(191, 191, 191)); searchPanel.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); searchPanel.setMaximumSize(new java.awt.Dimension(300, 2147483647)); searchPanel.setMinimumSize(new java.awt.Dimension(270, 56)); searchPanel.setPreferredSize(new java.awt.Dimension(270, 56)); searchPanel.setLayout(new javax.swing.BoxLayout(searchPanel, javax.swing.BoxLayout.LINE_AXIS)); searchCriteriaComboBox.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); ((JLabel) searchCriteriaComboBox.getRenderer()).setHorizontalAlignment(JLabel.RIGHT); searchCriteriaComboBox.setModel(new javax.swing.DefaultComboBoxModel( new String[] { NAME_LABEL.getContent(), LOGIN_ID_LABEL.getContent() })); searchCriteriaComboBox.setMaximumSize(new java.awt.Dimension(90, 30)); searchCriteriaComboBox.setMinimumSize(new java.awt.Dimension(90, 30)); searchCriteriaComboBox.setPreferredSize(new java.awt.Dimension(90, 30)); searchCriteriaComboBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { searchCriteriaComboBoxItemStateChanged(evt); } }); searchPanel.add(searchCriteriaComboBox); searchText.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); searchText.setText(CTRL_F_TOOLTIP.getContent()); searchText.setToolTipText(SEARCH_TOOLTIP.getContent()); searchText.setMaximumSize(new java.awt.Dimension(120, 30)); searchText.setMinimumSize(new java.awt.Dimension(80, 30)); searchText.setPreferredSize(new java.awt.Dimension(80, 30)); searchText.addFocusListener(new java.awt.event.FocusAdapter() { public void focusGained(java.awt.event.FocusEvent evt) { searchTextFocusGained(evt); } public void focusLost(java.awt.event.FocusEvent evt) { searchTextFocusLost(evt); } }); searchText.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { searchTextKeyReleased(evt); } }); searchPanel.add(searchText); searchButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); searchButton.setMnemonic('S'); searchButton.setText(SEARCH_BTN.getContent()); searchButton.setEnabled(false); searchButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); searchButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); searchButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); searchButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); searchButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { searchButtonActionPerformed(evt); } }); searchPanel.add(searchButton); btnPanel.add(searchPanel); btnPanel.add(filler81); saveOdsButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); saveOdsButton.setMnemonic('A'); saveOdsButton.setText(SAVE_ODS_BTN.getContent()); saveOdsButton.setToolTipText(SAVE_AS_TOOLTIP.getContent()); saveOdsButton.setAutoscrolls(true); saveOdsButton.setEnabled(false); saveOdsButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); saveOdsButton.setMaximumSize(new Dimension(CommonData.buttonWidthWide, buttonHeightNorm)); saveOdsButton.setMinimumSize(new Dimension(CommonData.buttonWidthWide, buttonHeightNorm)); saveOdsButton.setPreferredSize(new Dimension(CommonData.buttonWidthWide, buttonHeightNorm)); saveOdsButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveOdsButtonActionPerformed(evt); } }); btnPanel.add(saveOdsButton); btnPanel.add(filler82); closeFormButton.setFont(new java.awt.Font(font_Type, font_Style, font_Size)); closeFormButton.setMnemonic('c'); closeFormButton.setText(CLOSE_BTN.getContent()); closeFormButton.setMargin(new java.awt.Insets(0, 0, 0, 0)); closeFormButton.setMaximumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); closeFormButton.setMinimumSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); closeFormButton.setPreferredSize(new Dimension(buttonWidthNorm, buttonHeightNorm)); closeFormButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closeFormButtonActionPerformed(evt); } }); btnPanel.add(closeFormButton); southPanel.add(btnPanel); wholePanel.add(southPanel, java.awt.BorderLayout.SOUTH); getContentPane().add(wholePanel, java.awt.BorderLayout.CENTER); bottomPanel.setMinimumSize(new java.awt.Dimension(0, 40)); bottomPanel.setPreferredSize(new java.awt.Dimension(980, 40)); javax.swing.GroupLayout bottomPanelLayout = new javax.swing.GroupLayout(bottomPanel); bottomPanel.setLayout(bottomPanelLayout); bottomPanelLayout.setHorizontalGroup(bottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 1022, Short.MAX_VALUE)); bottomPanelLayout.setVerticalGroup(bottomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 40, Short.MAX_VALUE)); getContentPane().add(bottomPanel, java.awt.BorderLayout.SOUTH); getContentPane().add(filler3, java.awt.BorderLayout.EAST); setSize(new java.awt.Dimension(1030, 719)); setLocationRelativeTo(null); }
From source file:library.Form_Library.java
License:asdf
public static void resizeColumnWidth(JTable table) { final TableColumnModel columnModel = table.getColumnModel(); for (int column = 0; column < table.getColumnCount(); column++) { int width = 15; // Min width for (int row = 0; row < table.getRowCount(); row++) { TableCellRenderer renderer = table.getCellRenderer(row, column); Component comp = table.prepareRenderer(renderer, row, column); width = Math.max(comp.getPreferredSize().width + 1, width); }/*from w w w . j av a 2s.c o m*/ if (width > 300) { width = 300; } columnModel.getColumn(column).setPreferredWidth(width); } }
From source file:app.RunApp.java
/** * Create metrics table for multiple datasets tab * //from www.j a v a2 s.com * @param table Table of metrics * @param jpanel Panel * @param rowData Cell values * @param posx Position X * @param posy Position Y * @param width Width * @param height Height */ public void createJTableMetricsMultipleDatasets(JTable table, JPanel jpanel, Object rowData[][], int posx, int posy, int width, int height) { TableModel model = new MetricsTableModel(rowData, "multi"); table.setModel(model); TableColumnModel tcm = table.getColumnModel(); tcm.getColumn(0).setPreferredWidth(320); tcm.getColumn(1).setPreferredWidth(40); tcm.getColumn(1).setMaxWidth(40); tcm.getColumn(1).setMinWidth(40); JScrollPane scrollPane = new JScrollPane(table); scrollPane.setBounds(posx, posy, width, height); table.setBorder(BorderFactory.createLineBorder(Color.black)); jpanel.add(scrollPane, BorderLayout.CENTER); jpanel.repaint(); jpanel.validate(); }
From source file:app.RunApp.java
/** * Create table of metrics for principal tab * //from w w w. ja va 2 s . c om * @param table Table of metrics * @param jpanel Panel * @param rowData Cell values * @param posx Pos X * @param posy Pos Y * @param width Width * @param height Height */ public void createJTableMetricsPrincipal(JTable table, JPanel jpanel, Object rowData[][], int posx, int posy, int width, int height) { TableModel model = new MetricsTableModel(rowData); table.setModel(model); TableColumnModel tcm = table.getColumnModel(); tcm.getColumn(0).setPreferredWidth(420); tcm.getColumn(1).setPreferredWidth(70); DefaultTableCellRenderer rightRenderer = new DefaultTableCellRenderer(); rightRenderer.setHorizontalAlignment(JLabel.RIGHT); tcm.getColumn(1).setCellRenderer(rightRenderer); tcm.getColumn(2).setPreferredWidth(50); tcm.getColumn(2).setMaxWidth(50); tcm.getColumn(2).setMinWidth(50); JScrollPane scrollPane = new JScrollPane(table); scrollPane.setBounds(posx, posy, width, height); table.setBorder(BorderFactory.createLineBorder(Color.black)); jpanel.add(scrollPane, BorderLayout.CENTER); jpanel.repaint(); jpanel.validate(); }
From source file:app.RunApp.java
/** * Generates TableModel for IR intra class * //from w w w .jav a 2 s . c o m * @param jtable * @return */ private TableModel irIntraClassTableModel(JTable jtable) { DefaultTableModel tableModel = new DefaultTableModel() { @Override public boolean isCellEditable(int row, int column) { //This causes all cells to be not editable return false; } }; tableModel.addColumn("Label"); tableModel.addColumn("IR"); Object[] row = new Object[2]; String truncate; for (int i = 0; i < imbalancedLabels.length; i++) { truncate = Double.toString(imbalancedLabels[i].getIRIntraClass()); row[0] = imbalancedLabels[i].getName(); row[1] = MetricUtils.getValueFormatted(truncate, 3); tableModel.addRow(row); } jtable.setModel(tableModel); TableColumnModel tcm = jtable.getColumnModel(); tcm.getColumn(0).setPreferredWidth(80); tcm.getColumn(1).setPreferredWidth(50); return jtable.getModel(); }
From source file:app.RunApp.java
/** * Generates TableModel for IR inter class * // w w w . j a va 2 s. c om * @param jtable * @return */ private TableModel irInterClassTableModel(JTable jtable) { DefaultTableModel tableModel = new DefaultTableModel() { @Override public boolean isCellEditable(int row, int column) { //This causes all cells to be not editable return false; } }; tableModel.addColumn("Label"); tableModel.addColumn("IR"); Object[] row = new Object[2]; String truncate; IRInterClass = MetricUtils.getIRInterClassValues(labelAppearances); int temp = IRInterClass.length - 1; for (int i = temp; i >= 0; i--) { truncate = Double.toString(IRInterClass[i]); row[0] = labelAppearances[i].getName(); row[1] = MetricUtils.getValueFormatted(truncate, 3); tableModel.addRow(row); } jtable.setModel(tableModel); TableColumnModel tcm = jtable.getColumnModel(); tcm.getColumn(0).setPreferredWidth(80); tcm.getColumn(1).setPreferredWidth(50); return jtable.getModel(); }
From source file:app.RunApp.java
/** * Generates TableModel for frequency values * /* ww w . ja v a2 s . c o m*/ * @param jtable Table * @param dataset Multi-label dataset * @return Generated TableModel */ private TableModel frequencyTableModel(JTable jtable, MultiLabelInstances dataset) { DefaultTableModel tableModel = new DefaultTableModel() { @Override public boolean isCellEditable(int row, int column) { //This causes all cells to be not editable return false; } }; tableModel.addColumn("Label"); tableModel.addColumn("# Examples"); tableModel.addColumn("Frequency"); Object[] row = new Object[3]; ImbalancedFeature current; double freq; String truncate; for (int i = 0; i < dataset.getNumLabels(); i++) { current = labelAppearances[i]; row[0] = current.getName(); freq = current.getAppearances() * 1.0 / dataset.getNumInstances(); row[1] = current.getAppearances(); truncate = Double.toString(freq); row[2] = MetricUtils.getValueFormatted(truncate, 4); tableModel.addRow(row); } jtable.setModel(tableModel); TableColumnModel tcm = jtable.getColumnModel(); tcm.getColumn(0).setPreferredWidth(80); tcm.getColumn(1).setPreferredWidth(70); tcm.getColumn(2).setPreferredWidth(50); return jtable.getModel(); }
From source file:app.RunApp.java
/** * Generate TableModel for label frequency * //from w ww . j a va2 s. co m * @param jtable Table * @param dataset Multi-label dataset * @return Generated TableModel */ private TableModel labelFrequencyTableModel(JTable jtable, MultiLabelInstances dataset) { DefaultTableModel tableModel = new DefaultTableModel() { @Override public boolean isCellEditable(int row, int column) { //This causes all cells to be not editable return false; } }; tableModel.addColumn("Label"); tableModel.addColumn("# Examples"); tableModel.addColumn("Frequency"); Object[] row = new Object[3]; ImbalancedFeature current; double freq; String truncate; for (int i = 0; i < dataset.getNumLabels(); i++) { current = labelAppearances[i]; row[0] = current.getName(); freq = current.getAppearances() * 1.0 / dataset.getNumInstances(); row[1] = current.getAppearances(); truncate = Double.toString(freq); row[2] = MetricUtils.truncateValue(truncate, 4); tableModel.addRow(row); } jtable.setModel(tableModel); TableColumnModel tcm = jtable.getColumnModel(); tcm.getColumn(0).setPreferredWidth(80); tcm.getColumn(1).setPreferredWidth(70); tcm.getColumn(2).setPreferredWidth(70); return jtable.getModel(); }
From source file:app.RunApp.java
/** * Generates TableModel for labels per example values * //from ww w . j a v a2 s . c o m * @param jtable Table * @param labelsPerExample Number of labels per example * @return Generated TableModel */ private TableModel labelsPerExampleTableModel(JTable jtable, HashMap<Integer, Integer> labelsPerExample) { DefaultTableModel tableModel = new DefaultTableModel() { @Override public boolean isCellEditable(int row, int column) { //This causes all cells to be not editable return false; } }; tableModel.addColumn("# Labels"); tableModel.addColumn("# Examples"); tableModel.addColumn("Frequency"); Object[] row = new Object[3]; double freq; int freqCurrent; String truncate; int max = Utils.maxKey(labelsPerExample); for (int i = 0; i <= max; i++) { freqCurrent = 0; if (labelsPerExample.get(i) != null) { freqCurrent = labelsPerExample.get(i); } freq = freqCurrent * 1.0 / dataset.getNumInstances(); row[0] = i; row[1] = freqCurrent; truncate = Double.toString(freq); row[2] = MetricUtils.getValueFormatted(truncate, 4); tableModel.addRow(row); } jtable.setModel(tableModel); TableColumnModel tcm = jtable.getColumnModel(); tcm.getColumn(0).setPreferredWidth(80); tcm.getColumn(1).setPreferredWidth(50); tcm.getColumn(2).setPreferredWidth(70); return jtable.getModel(); }