Normand Briere
2019-07-27 1af7d3700724834e40ad8636bc9a56cdc3b19b15
cButton.java
....@@ -12,7 +12,7 @@
1212 {
1313 super(name);
1414
15
- setMargin(new java.awt.Insets(1, 1, 1, 1));
15
+ setMargin(new java.awt.Insets(1, -1, 1, -1));
1616
1717 if (border)
1818 setBorder(new javax.swing.border.EtchedBorder());
....@@ -21,4 +21,25 @@
2121 //setBorder(null); //new javax.swing.border.EmptyBorder(0,0,0,0));
2222 }
2323 }
24
+
25
+ cButton(javax.swing.ImageIcon icon, boolean border)
26
+ {
27
+ super(icon);
28
+
29
+ setMargin(new java.awt.Insets(-1, -1, -1, -1));
30
+
31
+//result = new JButton( icon );
32
+//result.setBorderPainted( false );
33
+//result.setContentAreaFilled( false );
34
+//
35
+//width = icon.getIconWidth();
36
+//height = icon.getIconHeight();
37
+//result.setPreferredSize( new Dimension( width, height ) );
38
+ if (border)
39
+ setBorder(new javax.swing.border.EtchedBorder());
40
+ else
41
+ {
42
+ //setBorder(null); //new javax.swing.border.EmptyBorder(0,0,0,0));
43
+ }
44
+ }
2445 }