Programación General > Java
Maximizar Componentes
jpaler:
--- Código: Text --- public class Frame1 extends JFrame { JPanel contentPane; JPanel jPanel1 = new JPanel(); VerticalFlowLayout verticalFlowLayout1 = new VerticalFlowLayout(); JLabel jLabel1 = new JLabel(); JTextField jTextField1 = new JTextField(); BorderLayout borderLayout1 = new BorderLayout(); JPanel jPanel2 = new JPanel(); JButton jButton1 = new JButton(); public Frame1() { contentPane = (JPanel) this.getContentPane(); contentPane.setLayout(borderLayout1); this.setSize(new Dimension(266, 114)); this.setTitle("¡¡¡ Prueba de Layout !!!"); jPanel1.setLayout(verticalFlowLayout1); jLabel1.setText("Nombre:"); jTextField1.setSelectionStart(11); jTextField1.setText("palermo :: jpalerx@gmail.com"); jButton1.setFont(new java.awt.Font("Dialog", 1, 11)); jButton1.setText("[ OK ]"); contentPane.add(jPanel1, BorderLayout.CENTER); jPanel1.add(jLabel1, null); jPanel1.add(jTextField1, null); jPanel1.add(jPanel2, null); jPanel2.add(jButton1, null); }}
...espero y ahora si te sirva...
Navegación
[*] Página Anterior
Ir a la versión completa