> [url=http://java.sun.com/docs/books/tutorial/uiswing/c
> omponents/dialog.html]How to Make Dialogs[/url]
>
> ~
Look out! Rerun coming.......
What yawmark says is always true
He's told me things I never knew
At times I had a bit of doubt
So I would go and check it out
But now I never waste my time
I'd simply rather make a rhyme
And when he tells me something new
I'll swear to you it's really true
kr
R.B.
Here is an example from Fred Swartz.
[url=http://leepoint.net/notes-java/index.html]Java Programming Notes - Fred Swartz[/url]
import javax.swing.JOptionPane;
public class JOptionPaneTest2 {
public static void main(String[] args) {
String[] choices = {"Democratic", "Republican",
"None of your business", "Comunist", "Socialist", "Complete Jackoff"};
int doAgain;
do {
int response = JOptionPane.showOptionDialog(
null// center over parent
, "How did you vote?"// message
, "Party Poll"// title in titlebar
, JOptionPane.YES_NO_OPTION // Option type
, JOptionPane.PLAIN_MESSAGE // messageType
, null// icon
, choices// Options
, "None of your business"// initial value
);
JOptionPane.showMessageDialog(null, "Response = " + response);
doAgain = JOptionPane.showConfirmDialog(null, "Again?");
} while (doAgain == JOptionPane.YES_OPTION);
System.exit(0);
}
}
You can show more, but it gets ugly..
I would look into extending the JDialog and laying out the buttons the way you want.
JJ
> okay, I did some research on JDialog and couldn't
> really find anything that could help me very much. I
> already know how to use JOptionPane, just couldn't
> figure out how to get 7 buttons to show on three
> different lines.
>
The UI handles the layout.
You may need to write your own UI.
here's a reference of where to start.
[url]http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/plaf/basic/BasicOptionPaneUI.html[/url]
kr
arbie