protected final synchronized void refreshForm() { // set the location OriginLabel.setText( MWC.Utilities.TextFormatting.BriefFormatLocation.toString(ImportRangeDataPanel._theOrigin)); // set the filename FilenameLabel.setText(super._theFilename); // special case - in constructor we may get called before the _dateF // has been initialised if (_dateF != null) { // set the DTG _theDate.setText(_dateF.format(new Date(ImportRangeDataPanel._theDTG))); } }
public JPrincipalNotificator() { initComponents(); jLabel1.setText(m_appuser.getName()); jLabel1.setIcon(m_appuser.getIcon()); }
public void setUpProperties() { // <Begin_setUpProperties> // <UserCode_Begin_Bean_Top> // this.setModal(true); setResizable(false); // <UserCode_End_Bean_Top> try { JTable1.setRowHeight(22); JTable1.setModel(ViewTableModel); JTable1.setGridColor(new Color(-1)); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JTable1, ex); } // <UserCode_Begin_Bean_JTable1> // <UserCode_End_Bean_JTable1> try { JPanel3.setBorder(new javax.swing.border.TitledBorder(resourceBundle.getString(""))); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JPanel3, ex); } // <UserCode_Begin_Bean_JPanel3> // <UserCode_End_Bean_JPanel3> try { JButton1.setFont(new Font("Dialog", 0, 12)); JButton1.setText(resourceBundle.getString("Add")); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JButton1, ex); } // <UserCode_Begin_Bean_JButton1> JButton1.setMnemonic('A'); // <UserCode_End_Bean_JButton1> try { JButton2.setFont(new Font("Dialog", 0, 13)); JButton2.setText(resourceBundle.getString("Edit")); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JButton2, ex); } // <UserCode_Begin_Bean_JButton2> JButton2.setMnemonic('E'); // <UserCode_End_Bean_JButton2> try { JButton3.setFont(new Font("Dialog", 0, 13)); JButton3.setText(resourceBundle.getString("Delete")); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JButton3, ex); } // <UserCode_Begin_Bean_JButton3> JButton3.setMnemonic('D'); // <UserCode_End_Bean_JButton3> try { closeButton.setFont(new Font("Dialog", 0, 13)); closeButton.setText(resourceBundle.getString("Close")); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + closeButton, ex); } // <UserCode_Begin_Bean_closeButton> // <UserCode_End_Bean_closeButton> // <UserCode_Begin_Bean_JPanel5> // JPanel5.setVisible(false); // <UserCode_End_Bean_JPanel5> try { JLabel1.setFont(new Font("Dialog", 0, 12)); JLabel1.setForeground(new Color(-16764109)); JLabel1.setText( resourceBundle.getString( "Use the following list to add , edit a View , its Properties and authorized Operations")); } catch (Exception ex) { showStatus( resourceBundle.getString("Exception while setting properties for bean ") + JLabel1, ex); } // <UserCode_Begin_Bean_JLabel1> // <UserCode_End_Bean_JLabel1> // <UserCode_Begin_Bean_ViewTableModel> ViewTableModel.setDataVector( new Object[0][0], new String[] {resourceBundle.getString("Views List")}); // <UserCode_End_Bean_ViewTableModel> JPanel5.setPreferredSize( new Dimension( JPanel5.getPreferredSize().width + 22, JPanel5.getPreferredSize().height + 38)); closeButton.setPreferredSize( new Dimension( closeButton.getPreferredSize().width + 8, closeButton.getPreferredSize().height + 0)); JButton3.setPreferredSize( new Dimension( JButton3.getPreferredSize().width + 32, JButton3.getPreferredSize().height + 0)); JButton2.setPreferredSize( new Dimension( JButton2.getPreferredSize().width + 45, JButton2.getPreferredSize().height + 0)); JButton1.setPreferredSize( new Dimension( JButton1.getPreferredSize().width + 47, JButton1.getPreferredSize().height + 2)); JPanel2.setPreferredSize( new Dimension( JPanel2.getPreferredSize().width + 10, JPanel2.getPreferredSize().height + 26)); JLabel2.setPreferredSize( new Dimension( JLabel2.getPreferredSize().width + 124, JLabel2.getPreferredSize().height + 72)); JPanel6.setPreferredSize( new Dimension( JPanel6.getPreferredSize().width + 10, JPanel6.getPreferredSize().height + 114)); JPanel1.setPreferredSize( new Dimension( JPanel1.getPreferredSize().width + 39, JPanel1.getPreferredSize().height + 38)); // <End_setUpProperties> JPanel1.setBorder( new javax.swing.border.TitledBorder(resourceBundle.getString("View Settings"))); JPanel5.setBorder( new javax.swing.border.TitledBorder( resourceBundle.getString("Views Properties and Operations"))); }
void refresh() { JPanel4.showCard("router"); // No Internationalisation if (routerobject != null) { ((com.adventnet.nms.examples.routermap.RouterDetails) JPanel4.getCard("router")) .setValues((Properties) routerobject.elementAt(0)); // No Internationalisation Properties prop = (Properties) routerobject.elementAt(0); RouterBtn.setBackground( SeverityInfo.getInstance() .getColor(Integer.parseInt(prop.getProperty("status")))); // No Internationalisation RouterBtn.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation JLabel1.setText( NmsClientUtil.GetString("Router details : ") + prop.getProperty("name")); // No Internationalisation } if (routerobject.size() >= 2) { one.setVisible(true); Properties prop = (Properties) routerobject.elementAt(1); one.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation one.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 3) { two.setVisible(true); Properties prop = (Properties) routerobject.elementAt(2); two.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation two.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 4) { three.setVisible(true); Properties prop = (Properties) routerobject.elementAt(3); three.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation three.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 5) { four.setVisible(true); Properties prop = (Properties) routerobject.elementAt(4); four.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation four.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 6) { five.setVisible(true); Properties prop = (Properties) routerobject.elementAt(5); five.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation five.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 7) { six.setVisible(true); Properties prop = (Properties) routerobject.elementAt(6); six.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation six.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 8) { seven.setVisible(true); Properties prop = (Properties) routerobject.elementAt(7); seven.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation seven.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 9) { eight.setVisible(true); Properties prop = (Properties) routerobject.elementAt(8); eight.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation eight.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 10) { nine.setVisible(true); Properties prop = (Properties) routerobject.elementAt(9); nine.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation nine.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } if (routerobject.size() >= 11) { ten.setVisible(true); Properties prop = (Properties) routerobject.elementAt(10); ten.setValues( SeverityInfo.getInstance().getColor(Integer.parseInt(prop.getProperty("status"))), prop.getProperty("ipAddress")); // No Internationalisation ten.setToolTipText(prop.getProperty("ipAddress")); // No Internationalisation } }
public void setUpProperties() throws Exception { // <Begin_setUpProperties> try { Top.setBackground(new Color(-1)); } catch (Exception ex) { showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + Top, ex); } setResizable(false); try { JPanel1.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel1, ex); } try { RouterBtn.setFocusPainted(false); RouterBtn.setIcon( NmsClientUtil.getImageIcon( applet.getDocumentBase() + "../images/router_new1.png")); // No Internationalisation RouterBtn.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + RouterBtn, ex); } try { eight.setOpaque(true); eight.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + eight, ex); } eight.setVisible(false); try { one.setOpaque(true); one.setToolTipText(""); // No Internationalisation one.setBackground(new Color(-1)); } catch (Exception ex) { showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + one, ex); } one.setVisible(false); try { six.setBackground(new Color(-1)); } catch (Exception ex) { showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + six, ex); } six.setVisible(false); try { three.setOpaque(true); three.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + three, ex); } three.setVisible(false); try { four.setOpaque(true); four.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + four, ex); } four.setVisible(false); try { seven.setOpaque(true); seven.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + seven, ex); } seven.setVisible(false); try { two.setBackground(new Color(-1)); } catch (Exception ex) { showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + two, ex); } two.setVisible(false); try { ten.setBackground(new Color(-1)); } catch (Exception ex) { showStatus(NmsClientUtil.GetString("Exception while setting properties for bean ") + ten, ex); } ten.setVisible(false); try { five.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + five, ex); } five.setVisible(false); try { nine.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + nine, ex); } nine.setVisible(false); try { JPanel2.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel2, ex); } try { JPanel3.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel3, ex); } try { JLabel1.setBackground(new Color(-1)); JLabel1.setHorizontalTextPosition(0); JLabel1.setHorizontalAlignment(0); JLabel1.setText(NmsClientUtil.GetString("Router details")); JLabel1.setFont(new Font("Dialog", 1, 14)); // No Internationalisation } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JLabel1, ex); } try { JPanel4.setBackground(new Color(-1)); java.lang.String[] JPanel4cardAndClassNames_array = new java.lang.String[2]; JPanel4cardAndClassNames_array[0] = "router=com.adventnet.nms.examples.routermap.RouterDetails"; // No Internationalisation JPanel4cardAndClassNames_array[1] = "inter=com.adventnet.nms.examples.routermap.IFDetails"; // No Internationalisation JPanel4.setCardAndClassNames(JPanel4cardAndClassNames_array); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel4, ex); } try { JPanel5.setBackground(new Color(-1)); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + JPanel5, ex); } try { RefreshBtn.setText(NmsClientUtil.GetString("Refresh")); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + RefreshBtn, ex); } try { CloseBtn.setText(NmsClientUtil.GetString("Close")); } catch (Exception ex) { showStatus( NmsClientUtil.GetString("Exception while setting properties for bean ") + CloseBtn, ex); } CloseBtn.setPreferredSize( new Dimension( CloseBtn.getPreferredSize().width + 12, CloseBtn.getPreferredSize().height + 0)); JPanel5.setPreferredSize( new Dimension( JPanel5.getPreferredSize().width + 229, JPanel5.getPreferredSize().height + 4)); JPanel4.setPreferredSize( new Dimension( JPanel4.getPreferredSize().width + 507, JPanel4.getPreferredSize().height + 293)); JLabel1.setPreferredSize( new Dimension( JLabel1.getPreferredSize().width + 132, JLabel1.getPreferredSize().height + 8)); JPanel3.setPreferredSize( new Dimension( JPanel3.getPreferredSize().width + 168, JPanel3.getPreferredSize().height + 6)); // <End_setUpProperties> }
/** * 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. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { panControl = new javax.swing.JPanel(); btnClose = new javax.swing.JButton(); btnLoadSelectedKassenzeichen = new javax.swing.JButton(); panAll = new javax.swing.JPanel(); panContentProgress = new javax.swing.JPanel(); pgbProgress = new javax.swing.JProgressBar(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); panContentMessage = new javax.swing.JPanel(); lblMessage = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); panContent = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tblKassenzeichen = new JXTable(); setPreferredSize(new java.awt.Dimension(500, 200)); panControl.setMinimumSize(new java.awt.Dimension(50, 50)); panControl.setPreferredSize(new java.awt.Dimension(300, 50)); btnClose.setText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.btnClose.text")); // NOI18N btnClose.addActionListener( new java.awt.event.ActionListener() { @Override public void actionPerformed(final java.awt.event.ActionEvent evt) { btnCloseActionPerformed(evt); } }); btnLoadSelectedKassenzeichen.setIcon( new javax.swing.ImageIcon( getClass() .getResource("/de/cismet/lagis/ressource/icons/buttons/postion.png"))); // NOI18N btnLoadSelectedKassenzeichen.setText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.btnLoadSelectedKassenzeichen.text")); // NOI18N btnLoadSelectedKassenzeichen.setToolTipText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.btnLoadSelectedKassenzeichen.toolTipText")); // NOI18N btnLoadSelectedKassenzeichen.setEnabled(false); btnLoadSelectedKassenzeichen.addActionListener( new java.awt.event.ActionListener() { @Override public void actionPerformed(final java.awt.event.ActionEvent evt) { btnLoadSelectedKassenzeichenActionPerformed(evt); } }); final javax.swing.GroupLayout panControlLayout = new javax.swing.GroupLayout(panControl); panControl.setLayout(panControlLayout); panControlLayout.setHorizontalGroup( panControlLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, panControlLayout .createSequentialGroup() .addContainerGap(378, Short.MAX_VALUE) .addComponent(btnLoadSelectedKassenzeichen) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnClose) .addContainerGap())); panControlLayout.setVerticalGroup( panControlLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panControlLayout .createSequentialGroup() .addContainerGap() .addGroup( panControlLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnClose) .addComponent(btnLoadSelectedKassenzeichen)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); panControlLayout.linkSize( javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnClose, btnLoadSelectedKassenzeichen}); panAll.setPreferredSize(new java.awt.Dimension(400, 251)); panAll.setLayout(new java.awt.CardLayout()); panContentProgress.setPreferredSize(new java.awt.Dimension(250, 140)); jLabel1.setIcon( new javax.swing.ImageIcon( getClass().getResource("/de/cismet/lagis/ressource/icons/searching.png"))); // NOI18N jLabel2.setText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.jLabel2.text")); // NOI18N final javax.swing.GroupLayout panContentProgressLayout = new javax.swing.GroupLayout(panContentProgress); panContentProgress.setLayout(panContentProgressLayout); panContentProgressLayout.setHorizontalGroup( panContentProgressLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panContentProgressLayout .createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( panContentProgressLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( pgbProgress, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE) .addComponent(jLabel2)) .addContainerGap())); panContentProgressLayout.setVerticalGroup( panContentProgressLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, panContentProgressLayout .createSequentialGroup() .addContainerGap(49, Short.MAX_VALUE) .addGroup( panContentProgressLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup( panContentProgressLayout .createSequentialGroup() .addComponent(jLabel2) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( pgbProgress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(12, 12, 12)) .addComponent( jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); panAll.add(panContentProgress, "card3"); panContentMessage.setPreferredSize(new java.awt.Dimension(250, 140)); lblMessage.setText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.lblMessage.text")); // NOI18N jLabel3.setIcon( new javax.swing.ImageIcon( getClass().getResource("/de/cismet/lagis/ressource/icons/warn.png"))); // NOI18N jLabel3.setText( org.openide.util.NbBundle.getMessage( VerdisCrossoverPanel.class, "VerdisCrossoverPanel.jLabel3.text")); // NOI18N final javax.swing.GroupLayout panContentMessageLayout = new javax.swing.GroupLayout(panContentMessage); panContentMessage.setLayout(panContentMessageLayout); panContentMessageLayout.setHorizontalGroup( panContentMessageLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, panContentMessageLayout .createSequentialGroup() .addContainerGap(28, Short.MAX_VALUE) .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent( lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 388, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); panContentMessageLayout.setVerticalGroup( panContentMessageLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, panContentMessageLayout .createSequentialGroup() .addContainerGap(49, Short.MAX_VALUE) .addGroup( panContentMessageLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent( lblMessage, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); panAll.add(panContentMessage, "card2"); tblKassenzeichen.setModel( new javax.swing.table.DefaultTableModel( new Object[][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String[] {"Title 1", "Title 2", "Title 3", "Title 4"})); jScrollPane1.setViewportView(tblKassenzeichen); final javax.swing.GroupLayout panContentLayout = new javax.swing.GroupLayout(panContent); panContent.setLayout(panContentLayout); panContentLayout.setHorizontalGroup( panContentLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panContentLayout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 476, Short.MAX_VALUE) .addContainerGap())); panContentLayout.setVerticalGroup( panContentLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( panContentLayout .createSequentialGroup() .addContainerGap() .addComponent( jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE) .addContainerGap())); panAll.add(panContent, "card4"); final javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(panAll, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE) .addComponent( panControl, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( layout .createSequentialGroup() .addComponent( panAll, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( panControl, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))); } // </editor-fold>//GEN-END:initComponents
private JPanel getContentPanel(WizardData wzd) { JPanel contentPanel1 = new JPanel(); welcomeTitle = new JLabel(); contentPanel1.setLayout(new java.awt.BorderLayout()); welcomeTitle.setFont(new java.awt.Font("MS Sans Serif", Font.BOLD, 11)); welcomeTitle.setText("Please insert already existing language files!"); contentPanel1.add(welcomeTitle, BorderLayout.NORTH); // ------------------------------------------------------------------------ Container mainPanel = new JPanel(); SpringLayout layout = new SpringLayout(); mainPanel.setLayout(layout); JTextArea infoText = new JTextArea(); infoText.setLineWrap(false); infoText.setEditable(false); infoText.setFocusable(false); infoText.setBackground(mainPanel.getBackground()); infoText.append(TInfoText.runtime.getText("newwizard", "site2")); JDialog parent = null; if (wzd.getWizard() != null) { parent = wzd.getWizard().getDialog(); } table = new LanguageManagerPanel(TGlobal.projects.getCurrentProject(), parent, true); rescanButton.addActionListener(this); baseButton.addActionListener(this); // Create and add the components. mainPanel.add(infoText); mainPanel.add(baseLabel); mainPanel.add(baseField); mainPanel.add(baseButton); mainPanel.add(rescanButton); mainPanel.add(table); // infoText layout.putConstraint(SpringLayout.WEST, infoText, 5, SpringLayout.WEST, mainPanel); layout.putConstraint(SpringLayout.NORTH, infoText, 5, SpringLayout.NORTH, mainPanel); // baseLabel ------------------------------------------------------------- layout.putConstraint(SpringLayout.WEST, baseLabel, 0, SpringLayout.WEST, infoText); layout.putConstraint(SpringLayout.NORTH, baseLabel, 12, SpringLayout.SOUTH, infoText); // nameField layout.putConstraint(SpringLayout.WEST, baseField, 5, SpringLayout.EAST, baseLabel); layout.putConstraint(SpringLayout.NORTH, baseField, 10, SpringLayout.SOUTH, infoText); // baseButton layout.putConstraint(SpringLayout.WEST, baseButton, 5, SpringLayout.EAST, baseField); layout.putConstraint(SpringLayout.NORTH, baseButton, 7, SpringLayout.SOUTH, infoText); // rescanButton layout.putConstraint(SpringLayout.WEST, rescanButton, 5, SpringLayout.EAST, baseButton); layout.putConstraint(SpringLayout.NORTH, rescanButton, 7, SpringLayout.SOUTH, infoText); // table layout.putConstraint(SpringLayout.WEST, table, 5, SpringLayout.WEST, mainPanel); layout.putConstraint(SpringLayout.NORTH, table, 15, SpringLayout.SOUTH, baseField); // panel edges ------------------------------------------------------ layout.putConstraint(SpringLayout.EAST, mainPanel, 5, SpringLayout.EAST, infoText); layout.putConstraint(SpringLayout.SOUTH, mainPanel, 5, SpringLayout.SOUTH, table); layout.layoutContainer(mainPanel); contentPanel1.add(mainPanel, BorderLayout.CENTER); return contentPanel1; }
public void redraw() { text.setText( Integer.toString(hour) + ':' + Integer.toString(min) + ':' + Integer.toString(sec)); }
public NumbrixGUI() throws ParseException { // Board gameBoard) throws ParseException{ // Board this.gameBoard = new Board(); // Container setTitle(TITLE); setSize(WIDTH, HEIGHT); setDefaultCloseOperation(EXIT_ON_CLOSE); // About Frame jFrameAbout = new javax.swing.JFrame(); jFrameAbout.setResizable(false); jFrameAbout.setPreferredSize(new Dimension(500, 300)); jTextAreaAbout = new javax.swing.JTextArea(); jTextAreaAbout.setBackground(new java.awt.Color(240, 240, 240)); jTextAreaAbout.setColumns(20); jTextAreaAbout.setRows(10); jTextAreaAbout.setText( "\t\tNumbrix Version 1\n\nClass Project for Artificial Intelligence course.\nUniversity of Florida\nCISE\n\n\n\n\nby Rainer Ledesma\nhttp://www.cise.ufl.edu/~rledesma/\n"); jTextAreaAbout.setFont(new java.awt.Font("Agency FB", 1, 20)); // NOI18N jTextAreaAbout.setEditable(false); jTextAreaAbout.setPreferredSize(new Dimension(500, 300)); javax.swing.GroupLayout jFrameAboutLayout = new javax.swing.GroupLayout(jFrameAbout.getContentPane()); jFrameAbout.getContentPane().setLayout(jFrameAboutLayout); jFrameAboutLayout.setHorizontalGroup( jFrameAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameAboutLayout .createSequentialGroup() .addGap(11, 11, 11) .addComponent( jTextAreaAbout, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jFrameAboutLayout.setVerticalGroup( jFrameAboutLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameAboutLayout .createSequentialGroup() .addGap(0, 16, Short.MAX_VALUE) .addComponent( jTextAreaAbout, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 17, Short.MAX_VALUE))); // // Instructions Frame jFrameInstructions = new javax.swing.JFrame(); jFrameInstructions.setResizable(false); jFrameInstructions.setPreferredSize(new Dimension(500, 300)); jTextAreaInstructions = new javax.swing.JTextArea(); jTextAreaInstructions.setBackground(new java.awt.Color(240, 240, 240)); jTextAreaInstructions.setColumns(20); jTextAreaInstructions.setRows(10); jTextAreaInstructions.setText( "\t\tNumbrix\n" + "The object of Numbrix is to fill the board with sequence of consecutive \n" + "numbers from 1 to the maximun cell count. The numbers must fillow a \n" + "horizontal or vertical path (no diagonals)\n"); jTextAreaInstructions.setFont(new java.awt.Font("Agency FB", 1, 20)); // NOI18N jTextAreaInstructions.setEditable(false); jTextAreaInstructions.setPreferredSize(new Dimension(500, 300)); javax.swing.GroupLayout jFrameInstructionsLayout = new javax.swing.GroupLayout(jFrameInstructions.getContentPane()); jFrameInstructions.getContentPane().setLayout(jFrameInstructionsLayout); jFrameInstructionsLayout.setHorizontalGroup( jFrameInstructionsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameInstructionsLayout .createSequentialGroup() .addGap(11, 11, 11) .addComponent( jTextAreaInstructions, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jFrameInstructionsLayout.setVerticalGroup( jFrameInstructionsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameInstructionsLayout .createSequentialGroup() .addGap(0, 16, Short.MAX_VALUE) .addComponent( jTextAreaInstructions, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 17, Short.MAX_VALUE))); // // File Chooser jFrameFileChooser = new javax.swing.JFrame(); jFileChooser = new javax.swing.JFileChooser(); jFileChooser.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { try { jFileChooserActionPerformed(evt); } catch (Exception ex) { JOptionPane.showMessageDialog(frame, "File Exception"); } } }); javax.swing.GroupLayout jFrameFileChooserLayout = new javax.swing.GroupLayout(jFrameFileChooser.getContentPane()); jFrameFileChooser.getContentPane().setLayout(jFrameFileChooserLayout); jFrameFileChooserLayout.setHorizontalGroup( jFrameFileChooserLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 618, Short.MAX_VALUE) .addGroup( jFrameFileChooserLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameFileChooserLayout .createSequentialGroup() .addGap(18, 18, 18) .addComponent( jFileChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18)))); jFrameFileChooserLayout.setVerticalGroup( jFrameFileChooserLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 456, Short.MAX_VALUE) .addGroup( jFrameFileChooserLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jFrameFileChooserLayout .createSequentialGroup() .addGap(27, 27, 27) .addComponent( jFileChooser, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(32, 32, 32)))); // // SidePanel jPanelSideBar = new javax.swing.JPanel(); jButtonRESET = new javax.swing.JButton(); jButtonSOLVE = new javax.swing.JButton(); jButtonNEWGAME = new javax.swing.JButton(); jLabelTIMER = new javax.swing.JLabel(); jButtonPAUSE = new javax.swing.JButton(); jButtonRESET.setText("RESET"); jButtonRESET.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonRESETActionPerformed(evt); } }); jButtonSOLVE.setText("SOLVE"); jButtonSOLVE.setEnabled(false); jButtonSOLVE.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { try { jButtonSOLVEActionPerformed(evt); } catch (IOException ex) { Logger.getLogger(NumbrixGUI.class.getName()).log(Level.SEVERE, null, ex); } } }); jButtonNEWGAME.setText("NEW GAME"); jButtonNEWGAME.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonNEWGAMEActionPerformed(evt); } }); jLabelTIMER.setText("TIMER"); jLabelTIMER.setFont(new java.awt.Font("Agency FB", 1, 18)); jButtonPAUSE.setText("PAUSE"); jButtonPAUSE.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPAUSEActionPerformed(evt); } }); jLabelClock = new javax.swing.JLabel(); jLabelClock.setFont(new java.awt.Font("Agency FB", 1, 24)); // NOI18N jLabelClock.setText("10 : 99 : 60"); javax.swing.GroupLayout jPanelSideBarLayout = new javax.swing.GroupLayout(jPanelSideBar); jPanelSideBar.setLayout(jPanelSideBarLayout); jPanelSideBarLayout.setHorizontalGroup( jPanelSideBarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( jPanelSideBarLayout .createSequentialGroup() .addContainerGap() .addGroup( jPanelSideBarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jButtonRESET, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jButtonSOLVE, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jButtonNEWGAME, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE) .addComponent( jButtonPAUSE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup( jPanelSideBarLayout .createSequentialGroup() .addGroup( jPanelSideBarLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelTIMER) .addComponent( jLabelClock, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap())); jPanelSideBarLayout.setVerticalGroup( jPanelSideBarLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, jPanelSideBarLayout .createSequentialGroup() .addContainerGap() .addComponent(jLabelTIMER) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent( jLabelClock, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButtonPAUSE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, 229, Short.MAX_VALUE) .addComponent(jButtonNEWGAME) .addGap(18, 18, 18) .addComponent(jButtonRESET) .addGap(18, 18, 18) .addComponent(jButtonSOLVE) .addContainerGap())); //////// // Menu jMenuBar1 = new javax.swing.JMenuBar(); jMenu1 = new javax.swing.JMenu(); jMenuItemNewGame = new javax.swing.JMenuItem(); jMenuItemExit = new javax.swing.JMenuItem(); jMenu2 = new javax.swing.JMenu(); jMenuItemInstructions = new javax.swing.JMenuItem(); jMenuItemAbout = new javax.swing.JMenuItem(); jMenu1.setText("File"); jMenu2.setText("Edit"); jMenuItemNewGame.setText("New Game"); jMenuItemExit.setText("Exit"); jMenuItemInstructions.setText("Instructions"); jMenuItemAbout.setText("About Numbrix"); jMenuBar1.add(jMenu1); jMenuBar1.add(jMenu2); jMenu1.add(jMenuItemNewGame); jMenu1.add(jMenuItemExit); jMenu2.add(jMenuItemInstructions); jMenu2.add(jMenuItemAbout); setJMenuBar(jMenuBar1); jMenuItemNewGame.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemNewGameActionPerformed(evt); } }); jMenuItemExit.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemExitActionPerformed(evt); } }); jMenuItemInstructions.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemInstructionsActionPerformed(evt); } }); jMenuItemAbout.addActionListener( new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemAboutActionPerformed(evt); } }); // // SolvedBoardPanel jPanelSolvedBoard = new javax.swing.JPanel(); jPanelSolvedBoard.setBackground(new java.awt.Color(255, 255, 255)); // Solved Board Frame jFrameSolvedBoard = new javax.swing.JFrame(); jFrameSolvedBoard.setTitle("Numbrix Solution"); javax.swing.GroupLayout jFrameSolvedBoardLayout = new javax.swing.GroupLayout(jFrameSolvedBoard.getContentPane()); jFrameSolvedBoard.getContentPane().setLayout(jFrameSolvedBoardLayout); jFrameSolvedBoardLayout.setHorizontalGroup( jFrameSolvedBoardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 400, Short.MAX_VALUE) .addGroup( jFrameSolvedBoardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanelSolvedBoard, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))); jFrameSolvedBoardLayout.setVerticalGroup( jFrameSolvedBoardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 300, Short.MAX_VALUE) .addGroup( jFrameSolvedBoardLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent( jPanelSolvedBoard, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))); // BoardPanel boardPanel = new javax.swing.JPanel(); boardPanel.setBackground(new java.awt.Color(255, 255, 255)); // Clock gameTimer = new GameTimer(jLabelClock); this.gameTimer.start(); this.gameTimer.run(); // Initialize // init(); // Container Layout javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addComponent( boardPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent( jPanelSideBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); layout.setVerticalGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup( javax.swing.GroupLayout.Alignment.TRAILING, layout .createSequentialGroup() .addContainerGap() .addGroup( layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent( boardPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent( jPanelSideBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); }
private void data_cols() { String search = tf_branch_id.getText(); String location = tf_search.getText(); loadData_branch_locations(S1_branch_locations.ret_data_by_branch_id(search, location)); jLabel6.setText("" + tbl_branch_locations_ALM.size()); }
/////////////////////////////////// // member functions ////////////////////////////////// protected final void initForm() { thisPanel = new JPanel(); thisPanel.setName("Import Range Data"); thisPanel.setLayout(new java.awt.BorderLayout()); _thePanel.add(thisPanel); _theWarning = new JTextArea(); _theWarning.setEditable(false); String theMessage = "Warning, data imported through this panel has"; theMessage += " speed and course calculated as over the ground."; theMessage += System.getProperties().getProperty("line.separator"); theMessage += "Debrief recognises PC Argos (RAO) and PMRF (PRN) files."; theMessage += System.getProperties().getProperty("line.separator"); theMessage += "See Debrief Help File for file format and details."; _theWarning.setText(theMessage); _theWarning.setLineWrap(true); _theWarning.setBorder(BorderFactory.createLoweredBevelBorder()); _theWarning.setWrapStyleWord(true); thisPanel.add("North", _theWarning); //////////////////////////////////////////// // auto generated stuff //////////////////////////////////////////// ButtonPanel = new javax.swing.JPanel(); importBtn = new javax.swing.JButton(); closeBtn = new javax.swing.JButton(); PropertiesList = new javax.swing.JPanel(); FilenamePanel = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); FilenameLabel = new javax.swing.JLabel(); selectFileBtn = new javax.swing.JButton(); FrequencyPanel = new javax.swing.JPanel(); FrequencyLabel = new javax.swing.JLabel(); FrequencyCombo = new TimeFrequencyCombo(); OriginPanel = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); OriginLabel = new javax.swing.JLabel(); selectOriginBtn = new javax.swing.JButton(); DTGPanel = new javax.swing.JPanel(); jLabel9 = new javax.swing.JLabel(); _theDate = new javax.swing.JTextField("2001/01/30"); ///////////////////////////////////////////////// // button panel first ////////////////////////////////////////////////// importBtn.setText("Import"); ButtonPanel.add(importBtn); closeBtn.setText("Close"); ButtonPanel.add(closeBtn); thisPanel.add(ButtonPanel, java.awt.BorderLayout.SOUTH); closeBtn.addActionListener( new ActionListener() { public void actionPerformed(final ActionEvent e) { doClose(); } }); importBtn.addActionListener( new ActionListener() { public void actionPerformed(final ActionEvent e) { doImport(); } }); /////////////////////////////////////////////////// // now the properties panel /////////////////////////////////////////////////// PropertiesList.setLayout(new java.awt.GridLayout(0, 1)); jLabel3.setText("Filename:"); FilenamePanel.add(jLabel3); FilenameLabel.setText(" blank "); FilenamePanel.add(FilenameLabel); selectFileBtn.setPreferredSize(new java.awt.Dimension(33, 27)); selectFileBtn.setToolTipText("Select file"); selectFileBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); selectFileBtn.setText("..."); selectFileBtn.addActionListener( new ActionListener() { public void actionPerformed(final ActionEvent e) { doEditFilename(); } }); FilenamePanel.add(selectFileBtn); PropertiesList.add(FilenamePanel); FrequencyLabel.setText("Frequency:"); FrequencyPanel.add(FrequencyLabel); FrequencyCombo.setPreferredSize(new java.awt.Dimension(100, 25)); FrequencyPanel.add(FrequencyCombo); PropertiesList.add(FrequencyPanel); jLabel7.setText("Origin:"); OriginPanel.add(jLabel7); OriginLabel.setText(" blank "); OriginPanel.add(OriginLabel); selectOriginBtn.setPreferredSize(new java.awt.Dimension(33, 27)); selectOriginBtn.setToolTipText("Select file"); selectOriginBtn.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); selectOriginBtn.setText("..."); selectOriginBtn.addActionListener( new ActionListener() { public void actionPerformed(final ActionEvent e) { editOrigin(); } }); OriginPanel.add(selectOriginBtn); PropertiesList.add(OriginPanel); ////////////////////////////////////////////////////// // DTG ///////////////////////////////////////////////////// jLabel9.setText("DTG (yyyy/mm/dd):"); _theDate.setText("2001/01/30"); _theDate.addFocusListener( new FocusAdapter() { public void focusLost(final FocusEvent e) { checkDTG(); } }); DTGPanel.add(jLabel9); DTGPanel.add(_theDate); PropertiesList.add(DTGPanel); final JPanel jp = new JPanel(); jp.setLayout(new FlowLayout()); jp.add(PropertiesList); thisPanel.add(jp, java.awt.BorderLayout.CENTER); }