Mejorando temas
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
package VistaControlador;
|
||||
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.GridBagLayout;
|
||||
|
||||
import javax.swing.ButtonGroup;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JRadioButton;
|
||||
import javax.swing.JRadioButtonMenuItem;
|
||||
|
||||
public class VistaPanelInterfaz extends VistaPanel{
|
||||
JRadioButtonMenuItem menu;
|
||||
ButtonGroup menu;
|
||||
JRadioButton temaClaro;
|
||||
JRadioButton temaRosa;
|
||||
JRadioButton temaOscuro;
|
||||
@@ -14,18 +18,34 @@ JCheckBox aplicarBarra;
|
||||
JButton aplicarCambios;
|
||||
|
||||
VistaPanelInterfaz() {
|
||||
this.menu = new JRadioButtonMenuItem();
|
||||
this.temaClaro = new JRadioButton();
|
||||
this.setLayout(new GridBagLayout());
|
||||
GridBagConstraints constrain = new GridBagConstraints();
|
||||
this.menu = new ButtonGroup();
|
||||
this.temaClaro = new JRadioButton("claro");
|
||||
this.menu.add(this.temaClaro);
|
||||
this.temaOscuro = new JRadioButton();
|
||||
this.temaOscuro = new JRadioButton("oscuro");
|
||||
this.menu.add(this.temaOscuro);
|
||||
this.temaRosa = new JRadioButton();
|
||||
this.temaRosa = new JRadioButton("rosa");
|
||||
this.menu.add(this.temaRosa);
|
||||
this.add(this.menu);
|
||||
this.aplicarBarra = new JCheckBox();
|
||||
this.add(this.aplicarBarra);
|
||||
//this.menu.setSize(200, 200);
|
||||
constrain.gridx = 0;
|
||||
constrain.gridy = 0;
|
||||
this.add(this.temaClaro,constrain);
|
||||
constrain.gridx = 1;
|
||||
constrain.gridy = 0;
|
||||
this.add(this.temaRosa,constrain);
|
||||
constrain.gridx = 2;
|
||||
constrain.gridy = 0;
|
||||
this.add(this.temaOscuro,constrain);
|
||||
this.aplicarBarra = new JCheckBox("Barra");
|
||||
constrain.gridx = 0;
|
||||
constrain.gridy = 1;
|
||||
this.add(this.aplicarBarra,constrain);
|
||||
this.aplicarCambios = new JButton("Aplicar");
|
||||
this.add(this.aplicarCambios);
|
||||
constrain.gridx = 1;
|
||||
constrain.gridy = 1;
|
||||
this.add(this.aplicarCambios,constrain);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user