Skip to content

Commit ecfc407

Browse files
change aesthetic for legend
1 parent 701bd50 commit ecfc407

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jmathplot/src/org/math/plot/components/LegendPanel.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import javax.swing.*;
88

9+
import javax.swing.border.Border;
910
import org.math.plot.*;
1011
import org.math.plot.canvas.*;
1112
import org.math.plot.plots.*;
@@ -39,7 +40,7 @@ public LegendPanel(PlotPanel _plotPanel, int _orientation) {
3940
container = new JPanel();
4041
container.setBackground(plotCanvas.getBackground());
4142
container.setLayout(new GridLayout(1, 1, inset, inset));
42-
//container.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.BLACK, 1),null));
43+
container.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createLineBorder(Color.GRAY, 1),null));
4344

4445
updateLegends();
4546

@@ -140,13 +141,16 @@ public class Legend extends JPanel {
140141
JPanel color;
141142
JLabel name;
142143
Plot plot;
144+
Border colorborder;
143145

144146
public Legend(Plot p) {
145147
plot = p;
146148

147149
setLayout(new BorderLayout(2, 2));
148150

149151
color = new JPanel();
152+
colorborder = BorderFactory.createMatteBorder(2, 1, 2, 1, Color.WHITE);
153+
color.setBorder(colorborder);
150154
name = new JLabel();
151155
name.setFont(plotPanel.getFont());
152156

0 commit comments

Comments
 (0)