Package charvax.swing

Examples of charvax.swing.JTextField


        JLabel label1 = new JLabel("Label 1:");
        panel1.add(label1);
        label1.setLocation(1, 2);

        JTextField textfield1 = new JTextField("Text Field 1");
        panel1.add(textfield1);
        textfield1.setLocation(11, 2);

        JPanel panel2 = new JPanel();
        panel2.setLayout(null);
        contentPane.add(panel2);
        panel2.setLocation(2, 10);
        panel2.setSize(40, 6);
        panel2.setBorder(new TitledBorder("Panel2"));

        JLabel label2 = new JLabel("Label 2:");
        panel2.add(label2);
        label2.setLocation(1, 2);

        JTextField textfield2 = new JTextField("Text Field 2");
        panel2.add(textfield2);
        textfield2.setLocation(11, 2);

        JButton okButton = new JButton("OK");
        okButton.addActionListener(this);
        contentPane.add(okButton);
        okButton.setLocation(25, 17);
View Full Code Here


            _visibleCb.setSelected(true);
            _visibleCb.addItemListener(this);
            northpan.add(_visibleCb);

            JPanel southpan = new JPanel();
            _textfield = new JTextField("This is some text.....");
            _textfield.setBorder(new EmptyBorder(1, 1, 1, 1));
            southpan.add(_textfield);

            add(northpan, BorderLayout.NORTH);
            add(southpan, BorderLayout.SOUTH);
View Full Code Here

            _comboBox.addItemListener(this);
            add(_comboBox, BorderLayout.CENTER);

            JPanel southpan = new JPanel();
            southpan.add(new JLabel(" Selected item is: "));
            _comboBoxSelection = new JTextField(15);
            _comboBoxSelection.setEnabled(false);
            southpan.add(_comboBoxSelection);
            add(southpan, BorderLayout.SOUTH);
        }
View Full Code Here

            add(eastpan, BorderLayout.EAST);

            JPanel southpan = new JPanel();
            southpan.add(new JLabel("Selected item(s):"));

            _listSelection = new JTextField(30);
            _listSelection.setEnabled(false);
            southpan.add(_listSelection);
            add(southpan, BorderLayout.SOUTH);
            pack();
        }
View Full Code Here

        gbc.anchor = GridBagConstraints.EAST;
        northpan.add(new JLabel("Enter some text here:"), gbc);

        gbc.gridx = 1;
        gbc.anchor = GridBagConstraints.WEST;
        northpan.add(new JTextField(20), gbc);
        gbc.insets = new Insets(0, 1, 1, 1);

        return northpan;
    }
View Full Code Here

        JPanel westpan = new JPanel();
        westpan.setBorder(new TitledBorder("West Panel"));
        westpan.setLayout(new BoxLayout(westpan, BoxLayout.Y_AXIS));
        westpan.add(new JLabel("west panel uses BoxLayout"));
        westpan.add(new JTextField("JTextField #1."));
        westpan.add(new JTextField("JTextField #2."));
        westpan.add(new JTextField("JTextField #3."));
        westpan.add(new JTextField("JTextField #4."));
        westpan.add(new JTextField("JTextField #5."));
        contentPane.add(westpan, BorderLayout.WEST);

        JPanel eastpan = new JPanel();
        eastpan.setBorder(new TitledBorder("East Panel"));
        eastpan.add(new JTextField("A JTextField"));
        contentPane.add(eastpan, BorderLayout.EAST);

        JPanel centerpan = new JPanel();
        centerpan.setLayout(new BorderLayout());
        centerpan.setBorder(new TitledBorder("Center Panel"));
View Full Code Here

        westpan.setBorder(new TitledBorder("West Panel"));
        westpan.setLayout(new BoxLayout(westpan, BoxLayout.Y_AXIS));
        JLabel label1 = new JLabel("Magenta label in west panel");
        westpan.add(label1);
        label1.setForeground(Color.magenta);
        JTextField textfield1 = new JTextField(
                "Cyan JTextField, red background");
        textfield1.setForeground(Color.cyan);
        textfield1.setBackground(Color.red);
        westpan.add(textfield1);

        JTextField whiteTextField = new JTextField("White JTextField");
        whiteTextField.setForeground(Color.white);
        westpan.add(whiteTextField);
        JTextField blueTextField = new JTextField("Blue JTextField");
        blueTextField.setForeground(Color.blue);
        westpan.add(blueTextField);
        JTextField yellowTextField = new JTextField("Yellow JTextField");
        yellowTextField.setForeground(Color.yellow);
        westpan.add(yellowTextField);
        JTextField blackTextField = new JTextField("Black JTextField");
        blackTextField.setForeground(Color.black);
        westpan.add(blackTextField);
        contentPane.add(westpan, BorderLayout.WEST);

        JPanel eastpan = new JPanel();
        eastpan.setForeground(Color.black);
        eastpan.setBorder(new TitledBorder("East Panel"));
        eastpan.add(new JTextField("A JTextField"));
        contentPane.add(eastpan, BorderLayout.EAST);

        JPanel centerpan = new JPanel();
        centerpan.setForeground(Color.white);
        centerpan.setBackground(Color.black);
View Full Code Here

TOP

Related Classes of charvax.swing.JTextField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.