Skip to content

Commit

Permalink
Lambda replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
DamonGuy committed Mar 21, 2024
1 parent 431c467 commit a4ab31d
Showing 1 changed file with 11 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,17 @@
public class JColorChooserDnDTest {

public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {

@Override
public void run() {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
JColorChooser colorChooser = new JColorChooser();
colorChooser.setDragEnabled(true);
panel.setBorder(BorderFactory.createTitledBorder("JColorChoosers"));
panel.add(colorChooser);
frame.setContentPane(panel);
frame.pack();
frame.setVisible(true);
}
SwingUtilities.invokeLater(() -> {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel();
JColorChooser colorChooser = new JColorChooser();
colorChooser.setDragEnabled(true);
panel.setBorder(BorderFactory.createTitledBorder("JColorChoosers"));
panel.add(colorChooser);
frame.setContentPane(panel);
frame.pack();
frame.setVisible(true);
});
}
}

0 comments on commit a4ab31d

Please sign in to comment.