Added Cancel button
This commit is contained in:
@@ -51,7 +51,7 @@ public class PathPopup extends JFrame
|
||||
}
|
||||
});
|
||||
|
||||
JButton cancel = new JButton("Done");
|
||||
JButton cancel = new JButton("Cancel");
|
||||
cancel.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
|
||||
@@ -3,6 +3,7 @@ import java.awt.BorderLayout;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
|
||||
@@ -97,6 +98,7 @@ public class WaypointPopup extends JFrame {
|
||||
for(int i = 0; i < options.length; i++)
|
||||
{
|
||||
ioptions[i] = Integer.valueOf(options[i]);
|
||||
System.out.println(ioptions[i]);
|
||||
}
|
||||
wp.setOptions(ioptions);
|
||||
|
||||
@@ -104,6 +106,17 @@ public class WaypointPopup extends JFrame {
|
||||
});
|
||||
south.add(edit);
|
||||
|
||||
JButton cancel = new JButton("Cancel");
|
||||
cancel.addActionListener(new ActionListener()
|
||||
{
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e)
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
south.add(cancel);
|
||||
|
||||
setContentPane(content);
|
||||
setVisible(true);
|
||||
setSize(300,250);
|
||||
|
||||
Reference in New Issue
Block a user