Forums Register Login

Constructing modified JOptionPane

+Pie Number of slices to send: Send
Hello,
I need to adapt a JOptionPane to allow users to drag the text from the pane. I construct an instance:

Problem is, the pane does not show, presumably disappearing as soon as it's shown. I do not see any methods for making it modal. When I use the

call, it behaves properly.
How do I ensure that it's showing and that it should be modal?
thanks...
+Pie Number of slices to send: Send
JOptionPane pane = new JOptionPane ("My Text");
JDialog dialog = pane.createDialog(...);
dialog.setModal(true);
+Pie Number of slices to send: Send
Thanks for the assist. The copying of text is not working. Has anyone done the adaptation of a normally non-Drag n Drop object to allow dragging text? Should not the object provide a visual clue on the dragging, ie: hi-liting of the dragged text? The code implementing the drag and drop from the Sun Java Tutorial:
LabelDnD.java
CLUCK LIKE A CHICKEN! Now look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1050 times.
Similar Threads
modal in jdk1.3 & Win2000
Customise JOptionPane
command link
modal in JDK 1.3
Add Checkbox in JOptionPane
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:34:18.