Revision 12013
trunk/libraries/libUIComponent/src-test-ui/org/gvsig/gui/beans/propertiespanel/ui/TestSlider.java | ||
---|---|---|
18 | 18 |
*/ |
19 | 19 |
package org.gvsig.gui.beans.propertiespanel.ui; |
20 | 20 |
|
21 |
import java.awt.BorderLayout; |
|
21 | 22 |
import java.awt.event.ActionEvent; |
22 | 23 |
import java.awt.event.ActionListener; |
23 | 24 |
|
24 | 25 |
import javax.swing.JButton; |
25 |
import javax.swing.JSlider;
|
|
26 |
import javax.swing.JColorChooser;
|
|
26 | 27 |
import javax.swing.event.ChangeEvent; |
27 | 28 |
import javax.swing.event.ChangeListener; |
28 | 29 |
|
... | ... | |
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
private void initialize() { |
44 |
JSlider boton = new JSlider(); |
|
45 |
this.add(boton); |
|
46 |
boton.addChangeListener(this); |
|
47 |
JButton boton2 = new JButton("OK"); |
|
48 |
this.add(boton2); |
|
49 |
boton2.addActionListener(this); |
|
45 |
this.setLayout(new BorderLayout()); |
|
46 |
JColorChooser color = new JColorChooser(); |
|
47 |
this.add(color, BorderLayout.CENTER); |
|
48 |
JButton boton = new JButton("OK"); |
|
49 |
this.add(boton, BorderLayout.SOUTH); |
|
50 |
boton.addActionListener(this); |
|
51 |
color.getSelectionModel().addChangeListener(this); |
|
50 | 52 |
} |
51 | 53 |
|
52 | 54 |
public void stateChanged(ChangeEvent e) { |
Also available in: Unified diff