This commit is contained in:
@@ -104,17 +104,17 @@ public class CameraApp extends JFrame {
|
||||
gbc.gridwidth = 1;
|
||||
gbc.gridx = 0; gbc.gridy = 2;
|
||||
JButton startButton = new JButton("Start Camera");
|
||||
startButton.addActionListener(_ -> startCamera());
|
||||
startButton.addActionListener(e -> startCamera());
|
||||
controlsPanel.add(startButton, gbc);
|
||||
|
||||
gbc.gridx = 1;
|
||||
JButton stopButton = new JButton("Stop Camera");
|
||||
stopButton.addActionListener(_ -> stopCamera());
|
||||
stopButton.addActionListener(e -> stopCamera());
|
||||
controlsPanel.add(stopButton, gbc);
|
||||
|
||||
gbc.gridx = 0; gbc.gridy = 3; gbc.gridwidth = 2;
|
||||
JButton snapshotButton = new JButton("Take Snapshot");
|
||||
snapshotButton.addActionListener(_ -> takeSnapshot());
|
||||
snapshotButton.addActionListener(e -> takeSnapshot());
|
||||
controlsPanel.add(snapshotButton, gbc);
|
||||
|
||||
mainPanel.add(controlsPanel, BorderLayout.SOUTH);
|
||||
@@ -126,7 +126,7 @@ public class CameraApp extends JFrame {
|
||||
contentPane.add(statusLabel, BorderLayout.SOUTH);
|
||||
|
||||
// Set up timer
|
||||
timer = new Timer(30, _ -> updateFrame());
|
||||
timer = new Timer(30, e -> updateFrame());
|
||||
|
||||
// Detect cameras after UI is ready
|
||||
SwingUtilities.invokeLater(this::detectCameras);
|
||||
@@ -624,7 +624,7 @@ class DownloadProgressBar extends JDialog {
|
||||
panel.add(progress, BorderLayout.CENTER);
|
||||
|
||||
JButton cancelButton = new JButton("Cancel");
|
||||
cancelButton.addActionListener(_ -> setVisible(false));
|
||||
cancelButton.addActionListener(e -> setVisible(false));
|
||||
panel.add(cancelButton, BorderLayout.SOUTH);
|
||||
|
||||
add(panel);
|
||||
|
||||
Reference in New Issue
Block a user