You are on page 1of 1

GUI

Objeto
Floating Topic

Contenedor

Ventana Panel JComponent

Frame Dialog JWindow Applet

JFrame JDialog JApplet

JFrame frame = new JFrame(); JDialog dialog = new JDialog(); extends JApplet {
JFrame frame = new JFrame("My JFrame"); dialog.setTitle("My JDialog"); public void init() {
frame.setSize(400, 300); dialog.setSize(400, 300); int width = getWidth();
frame.setLocation(100, 100); dialog.setLocation(100, 100); int height = getHeight();
frame.setVisible(true); dialog.setVisible(true);

JComponent

Panel JLabel JFileChooser JTextComponent AbstractButtom

JScrollPane JComboBox JColorChooser JTextField JTextArea JTextEditorPane JToggleButtom JButtom JMenuItem

JScrollPane scroll = new JComboBox<String> comboBox = new JFileChooser fileChooser = new JPasswordField JFormattedTextField JTextPane JCheckBox JRadioButtom JButton button = new JButton("Click Me"); JMenu
JScrollPane (); JComboBox<String>(); JFileChooser(); frame.add(button);
comoBox. admite ("Item 1") colorChooser.setColor(Color.red); frame.setVisible(true);
JTabbedPane colorChooser.setPreviewPanel(new JPasswordField passwordField = new JFormattedTextField textField = new JTextPane textPane = new JTextPane(); JCheckBox checkBox = new JCheckBox(); JRadioButton radioButton = new JMenu menu = new JMenu("File");
JMenuBar JPanel()); JPasswordField(); JFormattedTextField(); panel.add(textPane); JCheckBox checkBox = new JRadioButton(); JMenuItem menuItem = new
JPanel panel = new JPanel(); panel.add(passwordField); textField.setFormatter(new JCheckBox("My CheckBox"); JRadioButton radioButton = new JMenuItem("Open");
JTabbedPane pestaña = new panel.add(colorChooser); NumberFormatter()); checkBox.setSize(100, 20); JRadioButton("My RadioButton"); menu.add(menuItem);
JTabbedPane (); JMenu fileMenu = new JMenu("File"); textField.setValue(); panel.add(checkBox); radioButton.setSize(100, 20); JMenu submenu = new JMenu("New");
fileMenu.add(new JMenuItem("Open")); JTree JPanel panel = new JPanel(); JPanel panel = new JPanel(); panel.add(radioButton); menu.addSubMenu(submenu);
JRootPane fileMenu.add(new JMenuItem("Save")); panel.add(textField); panel.add(checkBox); JMenuBar menuBar = new JMenuBar();
fileMenu.add(new JMenuItem("Exit")); menuBar.add(menu);
menuBar.add(fileMenu); JTree tree = new JTree();
JRootPane rama = new tree.setModel(new DefaultTreeModel());
JRootPane (); JToolBar tree.setRoot(new
DefaultMutableTreeNode("Root"));
JInternalFrame
JPanel panel = new JPanel();
toolBar.add(new JLabel("File Name:")); panel.add(tree);
toolBar.add(new JTextField());
JInternalFrame infram = new JFrame (); toolBar.add(new JComboBox<String>());
frame.getContentPane().además.(); JTable
JFrame (); JProgressBar
JSplitPane JTable table = new JTable();
table.setModel(new DefaultTableModel());
JProgressBar progressBar = new table.setColumnNames(new String[]
JProgressBar(); {"Name", "Age", "Occupation"});
JSplitPane spane = new progressBar.setValue(50);
JSplitPane (); JPanel panel = new JPanel();
JPanel panel = new JPanel(); panel.add(table);
panel.add(progressBar);
JLayeredPane
JList
JSlider
JTLayeredPane layer = new
JLayeredPane (); JList list = new JList();
JSlider slider = new JSlider(); list.setModel(new DefaultListModel());
JOptionPane slider.setValue(50); list.setSelectionMode(ListSelectionModel.SI
JPanel panel = new JPanel(); NGLE_SELECTION);
panel.add(slider); JPanel panel = new JPanel();
JOptionPane pestaña = new panel.add(list);
JOptionPane (); JScrollBar

JScrollBar scrollBar = new JScrollBar();


scrollBar.setOrientation(JScrollBar.HORIZON
TAL);
scrollBar.setMinimum(0);
scrollBar.setMaximum(100);
JPanel panel = new JPanel();
panel.add(scrollBar);

You might also like