JavaRanch » Java Forums »
Java »
Applets
| Author |
breaking my dialog into 3 tabs
|
mickey coreolene
Greenhorn
Joined: Jan 10, 2005
Posts: 1
|
|
Hi, I have to break my DialogView into 3 tabs: general, security and site; can anyone help me out? public class NewRbsDialogView extends DialogView { /* // uncomment this and extend main class from JPanel to see it // in design mode void jbInit() throws Exception { init(); } */ // Slide Dimensions public static final int XLENGTH_OF_SLIDE = 379; public static final int YLENGTH_OF_SLIDE = 711; //621;//601; //541; // 485 // Pixel distance of text labels from the left hand side of the screen public static final int LEFT_OFFSET = 10; // Preferred size public static final int E = 62; public static final int F = 21; // Represents the size of the slide public Dimension size = null; // Code between jbuilder begin and end can be cut and pasted into a // Jbuilder files so that the designer can be used to create the correct // view for the dialog. // jbuilder begin JPanel southPnl = new JPanel(); JPanel pGeneral = new JPanel(); // RNC Name (Root RNC to which the RBS will be contected) JLabel rncNameLbl = new JLabel(""); public JComboBox cbRncName = new JComboBox(); // Rnc Modules public JLabel rncModuleLbl = new JLabel(); public JComboBox cbRncModule = new JComboBox(); // RBS Group Name JLabel rbsGroupNameLbl = new JLabel(""); public JComboBox cbRbsGroup = new JComboBox(); // RBS Name JLabel targetRbsNameLbl = new JLabel(""); public JTextField tfRbsName = new JTextField(); // RBS ID JLabel rbsIdLbl = new JLabel(""); public JTextField tfRbsId = new JTextField(); // RBS IP Domain Name JLabel ipDomainNameLbl = new JLabel(""); public JTextField tfDomainName = new JTextField(); // Redundant TU (is there a redundant Timing Unit in the RBS) JLabel redundantTULbl = new JLabel(""); public JComboBox cbRedundantTU = new JComboBox(); // Redundant MP (is there a redundant Main Processor in the RBS) JLabel redundantMPLbl = new JLabel(""); public JComboBox cbRedundantMP = new JComboBox(); // RBS Mim Version JLabel rbsMimVersionsLbl = new JLabel(""); public JComboBox cbMimVersion = new JComboBox(); // AESA Number. (ATM address of the RBS) JLabel aesaNumberLbl = new JLabel(""); public JTextField tfAesaNumber = new JTextField(); // Rbs Username public JLabel rbsUsernameLbl = new JLabel(); public JTextField tfRbsUsername = new JTextField(); // Rbs Password public JLabel rbsPasswordLbl = new JLabel(); // public JTextField tfPassword = new JTextField(); // sets the password to stars public JTextField tfPassword = new JPasswordField(); // second Rbs Password to verify user's input public JLabel rbsPasswordLb2 = new JLabel(); // sets the password to stars public JTextField tfPassword2 = new JPasswordField(); // Node Security State - ON or OFF JLabel nodeSecurityStateLbl = new JLabel(""); public JComboBox cbnodeSecurityState = new JComboBox(); // Secure Username public JLabel secureUsernameLbl = new JLabel(); public JTextField tfsecureUsername = new JTextField(); // Secure Password public JLabel securePasswordLbl = new JLabel(); // public JTextField tfPassword = new JTextField(); // sets the password to stars public JTextField securePassword = new JPasswordField(); // second Secure Password to verify user's input public JLabel securePasswordLb2 = new JLabel(); // sets the password to stars public JTextField securePassword2 = new JPasswordField(); // Site State - combo box JLabel rbsSiteStateLbl = new JLabel(""); public JComboBox cbSiteState = new JComboBox(); // Site Name - String public JLabel rbsSiteNameLbl = new JLabel(); public JTextField tfRbsSiteName = new JTextField(); // Rbs Location public JLabel rbsLocationLbl = new JLabel(); public JTextField tfRbsLocation = new JTextField(); // Rbs Time Zone public JLabel rbsTimeZoneLbl = new JLabel(); public JComboBox tfRbsTimeZone = new JComboBox(); // Description (Free text) public JLabel descriptionLbl = new JLabel(); public JTextField tfRbsDescription = new JTextField(); // Number of RBS (Number of Rbs to be added) JLabel numberOfRbssLbl = new JLabel(""); public JTextField tfRbssNumber = new JTextField(); // Cancel and OK buttons. public JButton okBtn = new JButton(""); public JButton cancelBtn = new JButton(""); public JComboBox cbRbsType = new JComboBox(); private JLabel rbsTypeLbl = new JLabel(""); // jbuilder end private java.awt.Container getContentPane() { return this; // he-he-he... } public void init(){ super.init(); setLayout( null ); // jbuilder begin // Overall panels // Overall panels southPnl.setLayout(new FlowLayout()); this.getContentPane().setLayout(null); southPnl.setBounds(new Rectangle(5, 678, 370, 37)); pGeneral.setBorder(BorderFactory.createEtchedBorder()); pGeneral.setBounds(new Rectangle(6, 4, 369, 675)); pGeneral.setLayout(null); // RNC Name rncNameLbl.setText("RNC_NAME_L"); rncNameLbl.setHorizontalAlignment(SwingConstants.LEFT); rncNameLbl.setAlignmentX((float) 10.0); rncNameLbl.setPreferredSize(new Dimension(62, 21)); rncNameLbl.setBounds(new Rectangle(10, 5, 180, 21)); cbRncName.setToolTipText("RNC_NAME_TOOLTIP"); cbRncName.setMaximumSize(new Dimension(4, 21)); cbRncName.setMinimumSize(new Dimension(4, 21)); cbRncName.setPreferredSize(new Dimension(4, 21)); cbRncName.setBounds(new Rectangle(187, 5, 175, 22)); // RNC Module rncModuleLbl.setText("RNC_MODULE_L"); rncModuleLbl.setHorizontalAlignment(SwingConstants.LEFT); rncModuleLbl.setAlignmentX((float) 10.0); rncModuleLbl.setBounds(new Rectangle(10, 33, 96, 21)); cbRncModule.setBounds(new Rectangle(187, 33, 175, 22)); cbRncModule.setToolTipText("RNC_MODULE_TOOLTIP"); // RBS Group Name rbsGroupNameLbl.setText("RBS_GROUP_NAME_L"); rbsGroupNameLbl.setBounds(new Rectangle(10, 61, 180, 21)); rbsGroupNameLbl.setPreferredSize(new Dimension(62, 21)); rbsGroupNameLbl.setAlignmentX((float) 10.0); rbsGroupNameLbl.setHorizontalAlignment(SwingConstants.LEFT); cbRbsGroup.setToolTipText("RBS_GROUP_TOOLTIP"); cbRbsGroup.setBounds(new Rectangle(187, 61, 175, 22)); // RBS Name targetRbsNameLbl.setText("TARGET_RBS_NAME_L"); targetRbsNameLbl.setBounds(new Rectangle(10, 89, 180, 21)); targetRbsNameLbl.setPreferredSize(new Dimension(62, 21)); targetRbsNameLbl.setAlignmentX((float) 10.0); targetRbsNameLbl.setHorizontalAlignment(SwingConstants.LEFT); tfRbsName.setToolTipText("RBS_NAME_TOOLTIP"); tfRbsName.setBounds(new Rectangle(187, 89, 175, 22)); // RBS Id rbsIdLbl.setText("TARGET_RBS_ID_L"); rbsIdLbl.setBounds(new Rectangle(10, 117, 176, 21)); rbsIdLbl.setPreferredSize(new Dimension(62, 21)); rbsIdLbl.setHorizontalAlignment(SwingConstants.LEFT); tfRbsId.setToolTipText("RBS_ID_TOOLTIP"); tfRbsId.setBounds(new Rectangle(187, 117, 175, 22)); // IP Domain Name ipDomainNameLbl.setText("IP_DOMAIN_NAME_L"); ipDomainNameLbl.setBounds(new Rectangle(10, 145, 180, 21)); ipDomainNameLbl.setPreferredSize(new Dimension(62, 21)); ipDomainNameLbl.setAlignmentX((float) 10.0); ipDomainNameLbl.setHorizontalAlignment(SwingConstants.LEFT); tfDomainName.setToolTipText("IP_DOMAIN_TOOLTIP"); tfDomainName.setBounds(new Rectangle(187, 145, 175, 22)); // Redundant MP redundantMPLbl.setText("REDUNDANT_MP_L"); redundantMPLbl.setHorizontalAlignment(SwingConstants.LEFT); redundantMPLbl.setAlignmentX((float) 10.0); redundantMPLbl.setPreferredSize(new Dimension(62, 21)); redundantMPLbl.setBounds(new Rectangle(10, 201, 180, 21)); cbRedundantMP.setToolTipText("MP_REDUNDANCY_TOOLTIP"); cbRedundantMP.setBounds(new Rectangle(187, 201, 175, 22)); // Redundant TU redundantTULbl.setText("REDUNDANT_TU_L"); redundantTULbl.setHorizontalAlignment(SwingConstants.LEFT); redundantTULbl.setAlignmentX((float) 10.0); redundantTULbl.setPreferredSize(new Dimension(62, 21)); redundantTULbl.setBounds(new Rectangle(10, 228, 180, 21)); cbRedundantTU.setToolTipText("TU_REDUNDANCY_TOOLTIP"); cbRedundantTU.setBounds(new Rectangle(187, 228, 175, 22)); // RBS MIM Version rbsMimVersionsLbl.setText("TARGET_RBS_MIM_VERSION_L"); rbsMimVersionsLbl.setBounds(new Rectangle(10, 256, 180, 21)); rbsMimVersionsLbl.setPreferredSize(new Dimension(62, 21)); rbsMimVersionsLbl.setAlignmentX((float) 10.0); rbsMimVersionsLbl.setHorizontalAlignment(SwingConstants.LEFT); cbMimVersion.setToolTipText("MIM_VERSION_TOOLTIP"); cbMimVersion.setBounds(new Rectangle(187, 256, 175, 22)); // RBS Aesa number aesaNumberLbl.setText("AESA_NUMBER_L"); aesaNumberLbl.setHorizontalAlignment(SwingConstants.LEFT); aesaNumberLbl.setAlignmentX((float) 10.0); aesaNumberLbl.setPreferredSize(new Dimension(62, 21)); aesaNumberLbl.setBounds(new Rectangle(10, 284, 180, 21)); tfAesaNumber.setToolTipText("AESA_NUMBER_TOOLTIP"); tfAesaNumber.setBounds(new Rectangle(187, 284, 175, 22)); // RBS Username rbsUsernameLbl.setText("USER_NAME_L"); rbsUsernameLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsUsernameLbl.setAlignmentX((float) 10.0); rbsUsernameLbl.setBounds(new Rectangle(10, 312, 111, 26)); tfRbsUsername.setPreferredSize(new Dimension(4, 21)); tfRbsUsername.setBounds(new Rectangle(187, 312, 175, 22)); tfRbsUsername.setToolTipText("RBS_USERNAME_TOOLTIP"); // RBS Password rbsPasswordLbl.setText("PASSWORD_L"); rbsPasswordLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsPasswordLbl.setAlignmentX((float) 10.0); rbsPasswordLbl.setBounds(new Rectangle(10, 340, 111, 26)); tfPassword.setPreferredSize(new Dimension(4, 21)); tfPassword.setBounds(new Rectangle(187, 340, 175, 22)); tfPassword.setToolTipText("RBS_PASSWORD_TOOLTIP"); // RBS second Password rbsPasswordLb2.setText("PASSWORD2_L"); rbsPasswordLb2.setHorizontalAlignment(SwingConstants.LEFT); rbsPasswordLb2.setAlignmentX((float) 10.0); rbsPasswordLb2.setBounds(new Rectangle(10, 368, 111, 26)); tfPassword2.setPreferredSize(new Dimension(4, 21)); tfPassword2.setBounds(new Rectangle(187, 368, 175, 22)); tfPassword2.setToolTipText("RBS_PASSWORD2_TOOLTIP"); // node security state nodeSecurityStateLbl.setText("NODE_SECURITY_STATE_L"); nodeSecurityStateLbl.setBounds(new Rectangle(10, 396, 180, 21)); nodeSecurityStateLbl.setPreferredSize(new Dimension(62, 21)); nodeSecurityStateLbl.setAlignmentX((float) 10.0); nodeSecurityStateLbl.setHorizontalAlignment(SwingConstants.LEFT); cbnodeSecurityState.setToolTipText("NODE_SECURITY_STATE_TOOLTIP"); cbnodeSecurityState.setBounds(new Rectangle(187, 396, 175, 22)); // secure Username secureUsernameLbl.setText("SEC_USER_NAME_L"); secureUsernameLbl.setHorizontalAlignment(SwingConstants.LEFT); secureUsernameLbl.setAlignmentX((float) 10.0); secureUsernameLbl.setBounds(new Rectangle(10, 424, 111, 26)); tfsecureUsername.setPreferredSize(new Dimension(4, 21)); tfsecureUsername.setBounds(new Rectangle(187, 424, 175, 22)); tfsecureUsername.setToolTipText("SECURE_USERNAME_TOOLTIP"); // secure Password securePasswordLbl.setText("SEC_PASSWORD_L"); securePasswordLbl.setHorizontalAlignment(SwingConstants.LEFT); securePasswordLbl.setAlignmentX((float) 10.0); securePasswordLbl.setBounds(new Rectangle(10, 452, 111, 26)); securePassword.setPreferredSize(new Dimension(4, 21)); securePassword.setBounds(new Rectangle(187, 452, 175, 22)); securePassword.setToolTipText("SECURE_PASSWORD_TOOLTIP"); // secure second Password securePasswordLb2.setText("SEC_PASSWORD2_L"); securePasswordLb2.setHorizontalAlignment(SwingConstants.LEFT); securePasswordLb2.setAlignmentX((float) 10.0); securePasswordLb2.setBounds(new Rectangle(10, 480, 111, 26)); securePassword2.setPreferredSize(new Dimension(4, 21)); securePassword2.setBounds(new Rectangle(187, 480, 175, 22)); securePassword2.setToolTipText("SECURE_PASSWORD2_TOOLTIP"); // RBS Site State rbsSiteStateLbl.setText("TARGET_RBS_SITE_STATE_L"); rbsSiteStateLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsSiteStateLbl.setAlignmentX((float) 10.0); rbsSiteStateLbl.setBounds(new Rectangle(10, 506, 119, 26)); cbSiteState.setBounds(new Rectangle(187, 506, 175, 22)); cbSiteState.setToolTipText("SITE_STATE_TOOLTIP"); // Site Name rbsSiteNameLbl.setText("SITE_NAME_L"); rbsSiteNameLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsSiteNameLbl.setAlignmentX((float) 10.0); rbsSiteNameLbl.setBounds(new Rectangle(10, 534, 100, 27)); tfRbsSiteName.setBounds(new Rectangle(187, 534, 175, 22)); tfRbsSiteName.setToolTipText("SITE_NAME_TOOLTIP"); // RBS Location rbsLocationLbl.setText("RBS_LOCATION_L"); rbsLocationLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsLocationLbl.setAlignmentX((float) 10.0); rbsLocationLbl.setBounds(new Rectangle(10, 562, 111, 26)); tfRbsLocation.setPreferredSize(new Dimension(4, 21)); tfRbsLocation.setBounds(new Rectangle(187, 562, 175, 22)); tfRbsLocation.setToolTipText("RBS_LOCATION_TOOLTIP"); // RBS Time Zone rbsTimeZoneLbl.setText("TimeZone_L"); rbsTimeZoneLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsTimeZoneLbl.setAlignmentX((float) 10.0); rbsTimeZoneLbl.setBounds(new Rectangle(10, 590, 119, 26)); tfRbsTimeZone.setBounds(new Rectangle(187, 590, 175, 22)); tfRbsTimeZone.setToolTipText("TimeZone_TOOLTIP"); // Description descriptionLbl.setText("DESCRIPTION_L"); descriptionLbl.setHorizontalAlignment(SwingConstants.LEFT); descriptionLbl.setAlignmentX((float) 10.0); descriptionLbl.setBounds(new Rectangle(10, 618, 100, 27)); tfRbsDescription.setBounds(new Rectangle(187, 618, 175, 22)); tfRbsDescription.setToolTipText("RBS_DESCRIPTION_TOOLTIP"); // Number of RBSs numberOfRbssLbl.setText("NUMBER_OF_RBSS_L"); numberOfRbssLbl.setBounds(new Rectangle(10, 646, 180, 21)); numberOfRbssLbl.setPreferredSize(new Dimension(62, 21)); numberOfRbssLbl.setAlignmentX((float) 10.0); numberOfRbssLbl.setHorizontalAlignment(SwingConstants.LEFT); tfRbssNumber.setToolTipText("NUMBER_OF_RBSS_TOOLTIP"); tfRbssNumber.setText("1"); tfRbssNumber.setBounds(new Rectangle(187, 646, 175, 22)); // rbs type rbsTypeLbl.setText("RBS_TYPE_L"); rbsTypeLbl.setHorizontalAlignment(SwingConstants.LEFT); rbsTypeLbl.setAlignmentX((float) 10.0); rbsTypeLbl.setPreferredSize(new Dimension(62, 21)); rbsTypeLbl.setBounds(new Rectangle(10, 173, 180, 21)); cbRbsType.setToolTipText("RBS_TYPE_TOOLTIP"); cbRbsType.setBounds(new Rectangle(187, 173, 175, 22)); cbRbsType.setName(NodeDataColumns.RBS_TYPE); // Ok button okBtn.setText("OK_BTN"); okBtn.setPreferredSize(new Dimension(90, 27)); // Cancel button cancelBtn.setText("CANCEL_BTN"); cancelBtn.setPreferredSize(new Dimension(90, 27));
|
 |
 |
|
|
subject: breaking my dialog into 3 tabs
|
|
|
|