blob: e9c496a89d18b5e0dbbcf8ae48627806c40eadc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/* Listing3604.java */
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Listing3604
extends JFrame
{
private static final String[] QUARTALE = {
"1. Quartal", "2. Quartal", "3. Quartal", "4. Quartal"
};
public Listing3604()
{
super("Test von JOptionPane");
addWindowListener(new WindowClosingAdapter(true));
}
public static void main(String[] args)
{
Listing3604 wnd = new Listing3604();
wnd.setLocation(100, 100);
wnd.setSize(300, 200);
wnd.setVisible(true);
String ret = (String)JOptionPane.showInputDialog(
wnd,
"W�hlen Sie das Quartal aus",
"JOptionPane.showInputDialog",
JOptionPane.QUESTION_MESSAGE,
null,
QUARTALE,
QUARTALE[2]
);
System.out.println("Ausgew�hlt wurde " + ret);
}
}
|