private void jbInit() throws Exception { this.getContentPane().setLayout(borderLayout1); this.setModal(true); this.setResizable(true); this.setTitle("API Account Settings"); btnOK.setText("OK"); btnOK.addActionListener(new DialogAccount_btnOK_actionAdapter(this)); jPanelUNCredential.setDebugGraphicsOptions(0); jPanelUNCredential.setLayout(borderLayout2); jPanelTokenCredential.setLayout(borderLayout3); jPanel1.setLayout(borderLayout5); jPanelUNCHolder.setLayout(borderLayout6); jPanelTCHolder.setLayout(borderLayout7); jPanelAPIAccount.setLayout(gridLayout1); gridLayout1.setColumns(1); gridLayout1.setRows(3); jLabel1.setPreferredSize(new Dimension(80, 15)); jLabel1.setText("DeveloperID:"); jLabel3.setPreferredSize(new Dimension(80, 15)); jLabel3.setText("Certificate:"); gridLayout2.setColumns(1); gridLayout2.setRows(2); jLabel6.setText("Paste your token text or "); jPanel10.setLayout(borderLayout4); jLabel7.setText(" "); jLabel8.setToolTipText(""); jLabel8.setText(" "); txtDeveloperID.setPreferredSize(new Dimension(120, 21)); txtDeveloperID.setSelectionStart(10); txtDeveloperID.setText(""); txtDeveloperID.addActionListener(new DialogAccount_txtDeveloperID_actionAdapter(this)); txtCertificate.setPreferredSize(new Dimension(120, 21)); txtCertificate.setText(""); jPanelBottom.setLayout(borderLayout8); jPanel13.setLayout(gridLayout3); gridLayout3.setColumns(1); gridLayout3.setRows(3); jLabel9.setPreferredSize(new Dimension(90, 15)); jLabel9.setText("API Server URL:"); jLabel10.setPreferredSize(new Dimension(90, 15)); jLabel10.setText("EPS Server URL:"); txtApiServerUrl.setPreferredSize(new Dimension(280, 21)); txtApiServerUrl.setText(""); txtEpsServerUrl.setPreferredSize(new Dimension(280, 21)); txtEpsServerUrl.setText("http://msa-e1.ebay.com/ws/eBayISAPI.dll?EpsBasicApp"); txtEpsServerUrl.setColumns(0); jPanel16.setLayout(borderLayout9); jLabel2.setPreferredSize(new Dimension(80, 15)); jLabel2.setText("ApplicationID:"); txtApplicationID.setPreferredSize(new Dimension(120, 21)); txtApplicationID.setRequestFocusEnabled(true); txtApplicationID.setText(""); txtTokenData.setPreferredSize(new Dimension(50, 200)); txtSigninUrl.setPreferredSize(new Dimension(280, 21)); txtSigninUrl.setText("http://my.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn"); jLabel11.setPreferredSize(new Dimension(90, 15)); jLabel11.setText("Sign-In URL:"); jPanel13.setBorder(BorderFactory.createEtchedBorder()); jScrollPane1.setPreferredSize(new Dimension(54, 40)); btnCancel.setToolTipText(""); btnCancel.setText("Cancel"); btnCancel.addActionListener(new DialogAccount_btnCancel_actionAdapter(this)); jPanelChoices.setLayout(borderLayout10); btnFetchToken.setText("Generate a New Token"); btnFetchToken.addActionListener(new DialogAccount_btnFetchToken_actionAdapter(this)); jPanel10.setPreferredSize(new Dimension(102, 40)); jPanel16.setPreferredSize(new Dimension(400, 480)); jPanelTokenCredential.setBorder(BorderFactory.createEtchedBorder()); jPanelApiCredentials.setBorder(BorderFactory.createEtchedBorder()); jPanelAppId.add(jLabel2, null); jPanelAppId.add(txtApplicationID, null); this.getContentPane().add(jPanelBottom, BorderLayout.SOUTH); jPanel10.add(jLabel7, BorderLayout.WEST); jPanel10.add(jLabel8, BorderLayout.EAST); jPanel10.add(jScrollPane1, BorderLayout.CENTER); jPanel16.add(jPanel13, BorderLayout.SOUTH); jScrollPane1.getViewport().add(txtTokenData, null); jPanelTokenCredential.add(jPanel11, BorderLayout.NORTH); jPanel11.add(jLabel6, null); jPanel11.add(btnFetchToken, null); jPanelTokenCredential.add(jPanel10, BorderLayout.CENTER); jPanelTCHolder.add(jPanelTokenCredential, BorderLayout.CENTER); this.getContentPane().add(jPanel16, BorderLayout.CENTER); jPanelDevId.add(jLabel1, null); jPanelDevId.add(txtDeveloperID, null); jPanelAPIAccount.add(jPanelDevId, null); jPanelCertificate.add(jLabel3, null); jPanelCertificate.add(txtCertificate, null); jPanel16.add(jPanelChoices, BorderLayout.CENTER); jPanelChoices.add(jPanelUNCHolder, BorderLayout.NORTH); jPanelAPIAccount.add(jPanelAppId, null); jPanelAPIAccount.add(jPanelCertificate, null); jPanelUNCHolder.add(jPanelUNCredential, BorderLayout.CENTER); jPanel16.add(jPanelApiCredentials, BorderLayout.NORTH); jPanelApiCredentials.add(jPanelAPIAccount, null); jPanelUNCredential.add(jPanel1, BorderLayout.SOUTH); jPanelChoices.add(jPanelTCHolder, BorderLayout.CENTER); jPanelBottom.add(jPanel12, BorderLayout.SOUTH); jPanel12.add(btnOK, null); jPanel12.add(btnCancel, null); jPanelApiServer.add(jLabel9, null); jPanelApiServer.add(txtApiServerUrl, null); jPanel13.add(jPanelEpsServer, null); jPanel13.add(jPanelApiServer, null); jPanelEpsServer.add(jLabel10, null); jPanelEpsServer.add(txtEpsServerUrl, null); jPanel13.add(jPanelSignInUrl, null); jPanelSignInUrl.add(jLabel11, null); jPanelSignInUrl.add(txtSigninUrl, null); }
public void execute_TestCase2() throws Exception { setUndecorated(true); setRootPaneCheckingEnabled(false); setForeground(Color.BLACK); setBackground(Color.WHITE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 774, 353); setLocationRelativeTo(null); setVisible(true); contentPane = new JPanel(); contentPane.setFocusCycleRoot(true); contentPane.setDebugGraphicsOptions(DebugGraphics.NONE_OPTION); contentPane.setBounds(new Rectangle(100, 100, 130, 100)); contentPane.setBackground(Color.WHITE); setContentPane(contentPane); contentPane.setLayout(null); JLabel lblEnterThePath = new JLabel("Select Path of Working Folder"); lblEnterThePath.setForeground(new Color(128, 128, 128)); lblEnterThePath.setFont(new Font("Tahoma", Font.BOLD, 11)); lblEnterThePath.setBackground(new Color(0, 0, 0)); lblEnterThePath.setBounds(63, 104, 187, 31); contentPane.add(lblEnterThePath); txtHello = new JTextField(); txtHello.setName(""); txtHello.setBounds(271, 104, 296, 31); txtHello.setEditable(false); contentPane.add(txtHello); txtHello.setColumns(10); JLabel lblSelectPathOf = new JLabel("Select Path of Configuration File"); lblSelectPathOf.setForeground(new Color(128, 128, 128)); lblSelectPathOf.setFont(new Font("Tahoma", Font.BOLD, 11)); lblSelectPathOf.setBounds(63, 149, 187, 28); contentPane.add(lblSelectPathOf); textField_1 = new JTextField(); textField_1.setBounds(271, 146, 296, 31); textField_1.setEditable(false); contentPane.add(textField_1); textField_1.setColumns(10); JLabel lblWelcomeToVitalhealth = new JLabel("Welcome to VitalHealth Test Automation Framework"); lblWelcomeToVitalhealth.setHorizontalTextPosition(SwingConstants.CENTER); lblWelcomeToVitalhealth.setForeground(new Color(128, 128, 128)); lblWelcomeToVitalhealth.setFont(new Font("Tahoma", Font.BOLD, 14)); lblWelcomeToVitalhealth.setHorizontalAlignment(SwingConstants.CENTER); lblWelcomeToVitalhealth.setBackground(Color.BLACK); lblWelcomeToVitalhealth.setBounds(191, 22, 465, 34); contentPane.add(lblWelcomeToVitalhealth); Button button = new Button("Browse"); button.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent arg0) { showOpenFileDialog(); } }); button.setForeground(Color.WHITE); button.setFont(new Font("Dialog", Font.BOLD, 12)); button.setBackground(new Color(51, 153, 255)); button.setBounds(573, 104, 113, 31); contentPane.add(button); Button button_1 = new Button("Browse"); button_1.addActionListener( new ActionListener() { public void actionPerformed(ActionEvent e) { showOpenFileDialog1(); } }); button_1.setForeground(Color.WHITE); button_1.setFont(new Font("Dialog", Font.BOLD, 12)); button_1.setBackground(new Color(51, 153, 255)); button_1.setBounds(573, 146, 113, 31); contentPane.add(button_1); Button button_2 = new Button("RUN TEST"); button_2.setForeground(Color.WHITE); button_2.setFont(new Font("Dialog", Font.BOLD, 12)); button_2.setBackground(new Color(30, 144, 255)); button_2.setBounds(63, 205, 623, 34); contentPane.add(button_2); Button button_3 = new Button("DOWNLOAD SAMPLE EXCEL WEB"); button_3.setActionCommand("DOWNLOAD SAMPLE EXCEL WEB"); button_3.setForeground(new Color(128, 128, 128)); button_3.setFont(new Font("Dialog", Font.BOLD, 12)); button_3.setBackground(Color.WHITE); button_3.setBounds(564, 309, 200, 34); contentPane.add(button_3); Button button_4 = new Button("DOWNLOAD SAMPLE EXCEL MOBILE"); button_4.setForeground(new Color(128, 128, 128)); button_4.setFont(new Font("Dialog", Font.BOLD, 12)); button_4.setBackground(Color.WHITE); button_4.setActionCommand("DOWNLOAD SAMPLE EXCEL MOBILE"); button_4.setBounds(23, 309, 227, 34); contentPane.add(button_4); JLabel icon = new JLabel(""); Image img = new ImageIcon(this.getClass().getResource("/VitalHealth.png")).getImage(); icon.setIcon(new ImageIcon(img)); icon.setBounds(23, 11, 173, 71); contentPane.add(icon); // L1 l1 = new L1(); L2 l2 = new L2(); button_4.addActionListener(new L1(Constants.Download_ExcelWeb, Constants.Excel_NameMobile)); button_3.addActionListener(new L1(Constants.Download_ExcelWeb, Constants.Excel_NameWeb)); button_2.addActionListener(l2); }