File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,12 @@ public static void main (String[] args) {
85
85
comboTest .addItem ("Prova due" );
86
86
content .add (labelCombo );
87
87
content .add (comboTest );
88
+
89
+ //settin Slider
90
+ JSlider slider = new JSlider ();
91
+ JSlider sliderVertical = new JSlider (JSlider .VERTICAL );
92
+ content .add (slider );
93
+ content .add (sliderVertical );
88
94
89
95
// add everything to the frame
90
96
frame .add (bar , BorderLayout .PAGE_START );
Original file line number Diff line number Diff line change @@ -54,6 +54,10 @@ public class MaterialLookAndFeel extends MetalLookAndFeel {
54
54
private static final String toolbarUI = MaterialToolBarUI .class .getCanonicalName ();
55
55
private static final String sliderUI = MaterialSliderUI .class .getCanonicalName ();
56
56
57
+ public static String getSliderui () {
58
+ return sliderUI ;
59
+ }
60
+
57
61
public String getToolBarUI () {
58
62
return toolBarUI ;
59
63
}
@@ -262,4 +266,6 @@ protected void initComponentDefaults (UIDefaults table) {
262
266
table .put ("Tree.openIcon" , new ImageIcon (MaterialImages .DOWN_ARROW ));
263
267
table .put ("Tree.selectionBorderColor" , null );
264
268
}
269
+
270
+
265
271
}
Original file line number Diff line number Diff line change 1
1
package mdlaf .resources ;
2
2
3
3
import javax .imageio .ImageIO ;
4
+ import javax .swing .Icon ;
5
+
4
6
import java .awt .image .BufferedImage ;
5
7
import java .io .IOException ;
6
8
import java .io .InputStream ;
@@ -18,6 +20,7 @@ public class MaterialImages {
18
20
public static final BufferedImage RADIO_BUTTON_OFF = loadImg ("/imgs/radio_button_off.png" );
19
21
public static final BufferedImage TOGGLE_BUTTON_ON = loadImg ("/imgs/toggle_on.png" );
20
22
public static final BufferedImage TOGGLE_BUTTON_OFF = loadImg ("/imgs/toggle_off.png" );
23
+ public static final BufferedImage SLIDER_POINT = loadImg ("/imgs/slider_point.png" );
21
24
22
25
private static BufferedImage loadImg (String imgPath ) {
23
26
try (InputStream inputStream = MaterialImages .class .getResourceAsStream (imgPath )) {
You can’t perform that action at this time.
0 commit comments