lblMapImage.setMaximumSize(new Dimension(300, 300));
lblMapImage.setBorder(new LineBorder(Color.BLACK, 2));
lblMapImage.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
selectImage(new LocalImageSelector());
}
});
JButton btnLocal = new JButton("Local");
GridBagConstraints gbc_btnLocal = new GridBagConstraints();
gbc_btnLocal.insets = new Insets(0, 0, 5, 5);
gbc_btnLocal.gridx = 1;
gbc_btnLocal.gridy = 2;
btnLocal.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
selectImage(new LocalImageSelector());
}
});
add(btnLocal, gbc_btnLocal);
JButton btnInternet = new JButton("Internet");