示例#1
0
  private JPanel getJContentPane() {
    if (jContentPane == null) {
      jLabel6 = new JLabel();
      jLabel6.setBounds(new Rectangle(11, 72, 218, 19));
      jLabel6.setText("Install log directory:");
      jLabel5 = new JLabel();
      jLabel5.setBounds(new Rectangle(11, 2, 394, 26));
      jLabel5.setText("Advanced Install. Please select your preferences");
      ButtonGroup group = new ButtonGroup();
      pathSuffix = new JTextArea();
      pathSuffix.setBounds(new Rectangle(232, 48, 61, 21));
      pathSuffix.setText("BIRCH");
      jLabel4 = new JLabel();
      jLabel4.setBounds(new Rectangle(22, 351, 312, 20));
      jLabel4.setText("* - Automatically detected, recommended.");
      jLabel3 = new JLabel();
      jLabel3.setBounds(new Rectangle(220, 48, 10, 21));
      jLabel3.setText(" /");
      jLabel2 = new JLabel();
      jLabel2.setBounds(new Rectangle(18, 250, 132, 18));
      jLabel2.setText("Binaries:");
      jLabel1 = new JLabel();
      jLabel1.setBounds(new Rectangle(11, 115, 127, 21));
      jLabel1.setText("Framework Type:");
      jLabel = new JLabel();
      jLabel.setBounds(new Rectangle(11, 28, 131, 17));
      jLabel.setText("Install directory:");
      jContentPane = new JPanel();
      jContentPane.setLayout(null);
      jContentPane.setSize(new Dimension(464, 376));
      jContentPane.add(jLabel, null);
      jContentPane.add(getJButton(), null);
      jContentPane.add(getJTextArea(), null);
      jContentPane.add(jLabel3, null);
      jContentPane.add(pathSuffix, null);
      jContentPane.add(jLabel1, null);
      jContentPane.add(getJCheckBox(), null);
      jContentPane.add(getJCheckBox1(), null);
      jContentPane.add(jLabel2, null);
      jContentPane.add(getJCheckBox2(), null);
      jContentPane.add(getJCheckBox3(), null);
      jContentPane.add(getJCheckBox4(), null);
      jContentPane.add(getJCheckBox5(), null);
      jContentPane.add(getJCheckBox6(), null);

      jContentPane.add(getLogTextField(), null);
      jContentPane.add(getLogButton(), null);
      jContentPane.add(jLabel4, null);
      jContentPane.add(getWindows32Checkbox(), null);
      jContentPane.add(getJRadioButton(), null);
      jContentPane.add(jLabel5, null);
      jContentPane.add(jLabel6, null);
      jContentPane.add(getGitRadioButton(), null);
      jContentPane.add(getGitComboBox(), null);
      group.add(releaseRadioButton);
      group.add(developmentRadioButton);
      group.add(gitRadioButton);
    }
    return jContentPane;
  }
 public CFSecuritySwingISOCurrencyAskDeleteJPanel(
     ICFSecuritySwingSchema argSchema, ICFSecurityISOCurrencyObj argFocus) {
   super();
   final String S_ProcName = "construct-schema-focus";
   if (argSchema == null) {
     throw CFLib.getDefaultExceptionFactory()
         .newNullArgumentException(getClass(), S_ProcName, 1, "argSchema");
   }
   // argFocus is optional; focus may be set later during execution as
   // conditions of the runtime change.
   swingSchema = argSchema;
   swingFocus = argFocus;
   // Construct the various objects
   textAreaMessage = new JTextArea("Are you sure you want to delete this ISO Currency?");
   actionOk = new ActionOk();
   actionCancel = new ActionCancel();
   buttonOk = new JButton(actionOk);
   buttonCancel = new JButton(actionCancel);
   attrJPanel = argSchema.getISOCurrencyFactory().newAttrJPanel(argFocus);
   scrollPane = new CFHSlaveJScrollPane(attrJPanel);
   // Lay out the widgets
   setSize(1024, 480);
   Dimension min = new Dimension(480, 300);
   setMinimumSize(min);
   add(textAreaMessage);
   textAreaMessage.setBounds(0, 0, 1024, 50);
   int xparts = (768 - (2 * 125)) / 3;
   add(buttonOk);
   buttonOk.setBounds(xparts, 55, 125, 40);
   add(buttonCancel);
   buttonCancel.setBounds(xparts + 125 + xparts, 55, 125, 40);
   add(scrollPane);
   scrollPane.setBounds(0, 100, 1024, 480 - 100);
 }
 public void doLayout() {
   Dimension sz = getSize();
   textAreaMessage.setBounds(0, 0, sz.width, 50);
   int xparts = (sz.width - (2 * 125)) / 3;
   buttonOk.setBounds(xparts, 55, 125, 40);
   buttonCancel.setBounds(xparts + 125 + xparts, 55, 125, 40);
   scrollPane.setBounds(0, 100, sz.width, sz.height - 100);
   scrollPane.doLayout();
 }
示例#4
0
  public ShowComp() throws InterruptedException, IOException {
    super("CONNECTED COMPUTERS");
    int x = 0, d = 20;
    mb = new JMenuBar();
    File = new JMenu("File");
    mb.add(File);
    exit = new JMenuItem("Exit");
    exit.addActionListener(this);
    File.add(exit);
    ta = new JTextArea();
    ta.setBounds(20, 30, 315, 470);
    ta.setEditable(false);
    add(ta);

    setJMenuBar(mb);

    sel = new JLabel("The connected computers are..");
    sel.setBounds(15, 5, 300, 30);
    add(sel);
    b1 = new JButton("<< BACK");
    b1.setBounds(140, 510, 100, 30);
    b1.setToolTipText("Back to main page");
    b1.addActionListener(this);
    add(b1);
    setLayout(null);
    while (x < 360) {
      x = x + d;
      setBounds(675, 50, x, 600);
      this.show();
    }
    // setVisible(true);
    String s = "192.168.0.", temp = null;
    Printer printer = new Printer();
    printer.start();
    Connector connector = new Connector(printer);
    connector.start();

    LinkedList targets = new LinkedList();
    for (int i = 1; i <= 255; i++) {
      temp = s + Integer.toString(i);
      Target t = new Target(temp);
      targets.add(t);
      connector.add(t);
    }
    Thread.sleep(2000);
    connector.shutdown();
    connector.join();

    for (Iterator i = targets.iterator(); i.hasNext(); ) {
      Target t = (Target) i.next();
      if (!t.shown) t.show();
    }

    setDefaultCloseOperation(DISPOSE_ON_CLOSE);
  }
示例#5
0
  // create and position GUI components; register event handlers
  private void createUserInterface() {
    // get content pane for attaching GUI components
    Container contentPane = getContentPane();

    // enable explicit positioning of GUI components
    contentPane.setLayout(null);

    // set up principalJLabel
    principalJLabel = new JLabel();
    principalJLabel.setBounds(20, 20, 80, 20);
    principalJLabel.setText("Principal:");
    contentPane.add(principalJLabel);

    // set up principalJTextField
    principalJTextField = new JTextField();
    principalJTextField.setBounds(80, 20, 90, 20);
    principalJTextField.setText("0");
    principalJTextField.setHorizontalAlignment(JTextField.RIGHT);
    contentPane.add(principalJTextField);

    // set up resultJLabel
    resultJLabel = new JLabel();
    resultJLabel.setBounds(20, 60, 100, 20);
    resultJLabel.setText("Result:");
    contentPane.add(resultJLabel);

    // set up resultJTextArea
    resultJTextArea = new JTextArea();
    resultJTextArea.setBounds(20, 85, 260, 120);
    resultJTextArea.setEditable(false);
    contentPane.add(resultJTextArea);

    // set up calculateJButton
    calculateJButton = new JButton();
    calculateJButton.setBounds(190, 20, 90, 20);
    calculateJButton.setText("Calculate");
    contentPane.add(calculateJButton);
    calculateJButton.addActionListener(
        new ActionListener() // anonymous inner class
        {
          // event handler called when calculateJButton is pressed
          public void actionPerformed(ActionEvent event) {
            calculateJButtonActionPerformed(event);
          }
        } // end anonymous inner class
        ); // end call to addActionListener

    // set properties of application's window
    setTitle("Comparing Rates"); // set title bar text
    setSize(310, 255); // set window size
    setVisible(true); // display window
  } // end method createUserInterface
示例#6
0
  /**
   * This method initializes jTextArea
   *
   * @return javax.swing.JTextArea
   */
  private JTextArea getJTextArea() {
    if (installDirTextArea == null) {

      String path;

      path = System.getProperty("user.home");

      installDirTextArea = new JTextArea();
      installDirTextArea.setEditable(false);
      installDirTextArea.setText(System.getProperty("user.home"));

      installDirTextArea.setBounds(new Rectangle(13, 49, 206, 21));
    }
    return installDirTextArea;
  }
  public MainScreen(Out out) {
    beep = new JButton("Beep");
    beep.addActionListener(this);
    beeps = new JButton("Beeps");
    beeps.addActionListener(this);
    reset = new JButton("Reset");
    reset.addActionListener(this);
    name = new JButton("Name");
    name.addActionListener(this);
    version = new JButton("Version");
    version.addActionListener(this);
    clear = new JButton("Clear");
    clear.addActionListener(this);

    area = new JTextArea(30, 80);
    id = new JTextField(25);
    id.setEditable(false);

    this.out = out;
    setSize(640, 480);
    setVisible(false);
    setTitle("PROMAG");
    setLayout(null);
    getContentPane().add(beep);
    getContentPane().add(beeps);
    getContentPane().add(reset);
    getContentPane().add(name);
    getContentPane().add(version);
    getContentPane().add(clear);
    getContentPane().add(id);
    getContentPane().add(area);
    beep.setBounds(540, 10, 80, 30);
    beeps.setBounds(540, 60, 80, 30);
    reset.setBounds(540, 110, 80, 30);
    name.setBounds(540, 160, 80, 30);
    version.setBounds(540, 210, 80, 30);
    clear.setBounds(540, 260, 80, 30);
    id.setBounds(540, 310, 80, 30);
    area.setBounds(10, 10, 520, 470);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
示例#8
0
	Swing4(String s)
	{
		f=new JFrame(s);
		
		ta=new JTextArea();
		ta.setBounds(50,50,400,200);
		f.add(ta);
		
		tf=new JTextField();
		tf.setBounds(50,300,100,50);
		f.add(tf);
		
		b=new JButton("FIND");
		b.setBounds(200,300,100,50);
		b.addActionListener(this);
		f.add(b);
		
		b1=new JButton("NEXT");
		b1.setBounds(350,300,100,50);
		b1.addActionListener(this);
		b1.setVisible(false);
		f.add(b1);
		
		tf1=new JTextField();
		tf1.setBounds(50,400,100,50);
		f.add(tf1);
		
		b2=new JButton("REPLACE");
		b2.setBounds(200,400,100,50);
		b2.addActionListener(this);
		f.add(b2);
		
		f.setLayout(null);
		f.setSize(500,500);
		f.setVisible(true);
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	}
示例#9
0
    public void actionPerformed(ActionEvent e) {
      String t = fid.getText();
      // char[] t2=fpass.getPassword();
      String t2 = fpass.getText();

      try {
        DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
        Connection con =
            DriverManager.getConnection(
                "jdbc:oracle:thin:@localhost:1521:xe", "system", "9696030257");
        Statement st = con.createStatement();
        ResultSet rs =
            st.executeQuery(
                "select * from database where userid='" + t + "' AND password='******'");
        rs.next();
        String g = rs.getString("userid");
        String h = rs.getString("password");
        String i = rs.getString("mob");
        String j = rs.getString("dob");
        if (g.equals(t) && h.equals(t2)) {
          // JOptionPane.showMessageDialog(null,"WoW  !!  You  Are  a  Valid  User");
          JFrame jf1 = new JFrame("About Saras");
          jf1.setBounds(500, 40, 500, 500);
          jf1.setVisible(true);
          jf1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          jf1.setLayout(null);
          String ab =
              "\n\nHis Name is Saraswatendra Singh.\nHe is pursuing B.Tech from ABES Engineering College(032) Ghaziabad U.P.\nHe is belong from VARANASI which is also called BANARAS.\nHis Email and Facebook id is  <*****@*****.**>\n\n\n \t\t\tTHANK YOU";
          String bc =
              "\n\n\nABOUT YOU:-\n\n\t UserId is < "
                  + g
                  + " >\n\t Password is <"
                  + h
                  + " > \n\t Mobile No is < "
                  + i
                  + " >\n\t Date Of Birth(dd/mm/yyyy) is < "
                  + j
                  + " >\n \n\nABOUT DEVELOPER:-"
                  + ab;
          JTextArea about = new JTextArea(bc);
          jf1.add(about);
          about.setBounds(0, 0, 500, 500);
          JButton rest = new JButton("ResetPassword");
          about.add(rest);
          rest.setBounds(30, 400, 150, 20);
          Cursor k1 = new Cursor(Cursor.HAND_CURSOR);
          rest.setCursor(k1);
          rest.addActionListener(new ResetPassword());
          JButton restmob = new JButton("ResetMobileNo");
          about.add(restmob);
          restmob.setBounds(230, 400, 150, 20);
          Cursor k2 = new Cursor(Cursor.HAND_CURSOR);
          restmob.setCursor(k2);
          restmob.addActionListener(new ResetMob());
        }
      } catch (Exception ex) {
        System.out.print(ex);
        JOptionPane.showMessageDialog(
            null,
            "UserId  or  Password  MissMatched !!!  please  Enter  Valid  UserId and Password");
      }
    }
示例#10
0
  Intern_Chat() {

    frame = new JFrame("Guide ME");
    frame.setSize(480, 550);
    frame.setResizable(false);
    frame.setVisible(true);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setBackground(new Color(211, 211, 211));
    frame.getContentPane().setLayout(null);

    // getContentPane().addMouseListener(new action2());
    JLabel lblGuideMe = new JLabel("Guide ME");
    lblGuideMe.setFont(new Font("Tahoma", Font.BOLD, 16));
    lblGuideMe.setBounds(10, 11, 85, 21);
    frame.getContentPane().add(lblGuideMe);

    textField = new JTextField();
    textField.setBounds(105, 11, 135, 21);
    frame.getContentPane().add(textField);
    textField.setColumns(10);

    ImageIcon search = new ImageIcon("list.PNG");
    btnNewButton = new JButton(search);
    btnNewButton.addActionListener(new Intern_Chat_action());
    btnNewButton.setBackground(new Color(255, 255, 255));
    btnNewButton.setFont(new Font("Tahoma", Font.BOLD, 11));
    btnNewButton.setBounds(240, 11, 20, 21);
    frame.getContentPane().add(btnNewButton);

    btnNewButton_1 = new JButton("Home");
    btnNewButton_1.addActionListener(new Intern_Chat_action());
    btnNewButton_1.setForeground(new Color(0, 0, 0));
    btnNewButton_1.setBackground(new Color(65, 105, 225));
    btnNewButton_1.setBounds(265, 12, 78, 21);
    frame.getContentPane().add(btnNewButton_1);

    ImageIcon list = new ImageIcon("Capture.PNG");
    btnNewButton_2 = new JButton(list);
    btnNewButton_2.setBounds(350, 11, 22, 23);
    btnNewButton_2.setForeground(new Color(0, 0, 0));
    btnNewButton_2.setBackground(new Color(65, 105, 225));
    frame.getContentPane().add(btnNewButton_2);
    btnNewButton_2.addActionListener(new Intern_Chat_action());

    btnNewButton_3 = new JButton(list);
    btnNewButton_3.addActionListener(new Intern_Chat_action());
    btnNewButton_3.setBounds(380, 11, 22, 23);
    frame.getContentPane().add(btnNewButton_3);

    String content[] = {
      "Friends",
      "Places",
      "Brands",
      "Notifications",
      "Tastes",
      "Rates",
      "Message",
      "settings",
      "Log out"
    };

    // for view frinds and palces and brands
    lists = new JList(content);
    lists.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lists.setBackground(new Color(65, 105, 225));
    frame.getContentPane().add(lists);
    lists.setBounds(295, 35, 74, 171);
    lists.hide();

    String content2[] = {
      "Chick In",
      "Add Friend",
      "Add Place",
      "Add Brand",
      "Give Rate",
      "Remove Friend",
      "Remove Brand",
      "Remove Place",
      "chat"
    };
    lists1 = new JList(content2);
    lists1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lists1.setBackground(new Color(65, 105, 225));
    frame.getContentPane().add(lists1);
    lists1.setBounds(379, 35, 95, 171);
    lists1.hide();

    lists.addListSelectionListener(new Intern_Chat_action());
    lists1.addListSelectionListener(new Intern_Chat_action());

    JPanel panel_1 = new JPanel();
    panel_1.setBackground(new Color(0, 191, 255));
    panel_1.setBounds(0, 0, 560, 50);
    frame.getContentPane().add(panel_1);

    panel = new JPanel();
    panel.setBounds(0, 101, 185, 418);
    panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
    JScrollPane scr1 = new JScrollPane(panel);
    scr1.setBounds(0, 101, 185, 418);
    JLabel Users[] = new JLabel[20];
    JLabel message[] = new JLabel[20];
    for (int i = 0; i < 20; i++) {
      if (i % 2 == 0) {
        Users[i] = new JLabel("12:52 : alaa");
        message[i] = new JLabel("how are you bitch ?");
      } else {
        Users[i] = new JLabel("12:52: You");
        message[i] = new JLabel("f**k you");
      }
      panel.add(Users[i]);
      panel.add(message[i]);
    }
    frame.getContentPane().add(scr1);

    lblChat = new JLabel("Chat");
    lblChat.setFont(new Font("Tahoma", Font.BOLD, 14));
    lblChat.setBounds(23, 61, 72, 29);
    frame.getContentPane().add(lblChat);

    textArea = new JTextArea();
    textArea.setBounds(230, 120, 173, 69);
    JScrollPane scr = new JScrollPane(textArea);
    scr.setBounds(230, 120, 173, 69);
    frame.getContentPane().add(scr);

    JButton btnSend = new JButton("Send");
    btnSend.setFont(new Font("Tahoma", Font.BOLD, 14));
    btnSend.setBounds(264, 197, 78, 23);
    frame.getContentPane().add(btnSend);
  }
示例#11
0
  InputFrame() {
    JPanel pane = new JPanel();
    pane.setLayout(null);
    pane.setBackground(Color.LIGHT_GRAY);
    add(pane);
    // JTextField文字欄位元件
    lblName = new JLabel("姓名:");
    lblName.setBounds(10, 10, 40, 20);
    pane.add(lblName);
    text0.setBounds(50, 10, 80, 20);
    text0.addActionListener(textfield);
    pane.add(text0);
    // JSpinner數位序列元件
    lblAge = new JLabel("年齡:");
    lblAge.setBounds(170, 10, 40, 20);
    pane.add(lblAge);
    JSpinner spin = new JSpinner(new SpinnerNumberModel(20, 1, 100, 1));
    spin.setBounds(210, 10, 80, 20);
    spin.addChangeListener(spinner);
    pane.add(spin);
    // JRadioButton選項圓鈕元件
    lblSex = new JLabel("性別:");
    lblSex.setBounds(10, 40, 40, 20);
    pane.add(lblSex);
    ButtonGroup group = new ButtonGroup();
    JRadioButton rb1 = new JRadioButton("帥哥", false);
    rb1.setBounds(50, 40, 60, 20);
    JRadioButton rb2 = new JRadioButton("美女", false);
    rb2.setBounds(110, 40, 60, 20);
    rb1.setOpaque(false);
    rb2.setOpaque(false); // 秀出底色
    rb1.addActionListener(radio);
    rb2.addActionListener(radio);
    group.add(rb1);
    group.add(rb2);
    pane.add(rb1);
    pane.add(rb2);
    // JCheckBox核對方塊元件
    lblInter = new JLabel("興趣:");
    lblInter.setBounds(10, 70, 50, 20);
    pane.add(lblInter);
    for (int i = 0; i < check.length; i++) {
      check[i] = new JCheckBox(checkItem[i]);
      check[i].setBounds(50 + 60 * i, 70, 60, 20);
      check[i].setOpaque(false);
      check[i].addActionListener(checkbox);
      pane.add(check[i]);
    }
    // JComboBox下拉式清單元件
    lblAcad = new JLabel("學歷:");
    lblAcad.setBounds(10, 100, 50, 20);
    pane.add(lblAcad);
    String[] items_c = {"博士", "碩士", "大學", "高中", "國中", "國小"};
    JComboBox c_box = new JComboBox(items_c);
    c_box.setBounds(50, 100, 100, 20);
    c_box.addItemListener(cbo);
    pane.add(c_box);
    // JList清單元件
    lblPlace = new JLabel("居住地區:");
    lblPlace.setBounds(170, 100, 70, 20);
    pane.add(lblPlace);
    String[] items_p = {
      "台北", "桃園", "新竹", "苗栗", "台中", "彰化", "雲林", "嘉義", "台南", "高雄", "屏東", "花蓮", "台東", "澎湖"
    };
    JList list = new JList(items_p);
    list.setVisibleRowCount(4);
    list.addListSelectionListener(list_p);
    JScrollPane scroll = new JScrollPane(list);
    scroll.setBounds(240, 100, 80, 80);
    pane.add(scroll);
    // JTextArea文字區域元件
    texta.setBounds(10, 190, 330, 40);
    texta.setEditable(false);
    pane.add(texta);

    setTitle("輸入元件綜合應用");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(50, 50, 360, 280);
    setVisible(true);
  }