tag:blogger.com,1999:blog-4481781585418842840.post8505102094760777866..comments2024-03-29T15:37:55.580+09:00Comments on Java Swing Tips: Modal Internal Frameateraihttp://www.blogger.com/profile/07647339065761407369noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-4481781585418842840.post-62993356651475920092012-03-24T18:39:53.616+09:002012-03-24T18:39:53.616+09:00Hi Sjors, Thanks for reporting.
Note:
- Alt-1, Alt...Hi Sjors, Thanks for reporting.<br />Note:<br />- Alt-1, Alt-2 simply use JOptionPane.showInternalXXXDialog(...), but JInternalFrame System Menu cause unexpected behavior(mouse).<br />- To use JComboBox in this case (Alt-3 JOptionPane), may need to use refrection... following code:<br />JOptionPane optionPane = new JOptionPane();<br />JInternalFrame modal = optionPane.createInternalFrame(desktop,ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-90737984150110749672012-03-23T23:25:06.433+09:002012-03-23T23:25:06.433+09:00This leads to erroneous behavior when a JCombobox ...This leads to erroneous behavior when a JCombobox is present in the dialog...(the Combobox's list popup isn't shown). <br /><br />That's why JOptionpane#showInternalXXXX uses PopupFactory.forceHeavyWeightPopupKey, Boolean.TRUE);Sjorshttps://www.blogger.com/profile/05727841419170263754noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-4830581018013858442010-12-07T01:56:12.560+09:002010-12-07T01:56:12.560+09:00Thank you.Thank you.Abhttps://www.blogger.com/profile/16921269782988179431noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-45293854032733463002010-12-01T17:16:53.475+09:002010-12-01T17:16:53.475+09:00You can use the JOptionPane#getInputValue() method...You can use the JOptionPane#getInputValue() method.<br /><br />final JOptionPane optionPane = new JOptionPane();<br />optionPane.setMessage("Hello, World");<br />optionPane.setMessageType(JOptionPane.QUESTION_MESSAGE);<br />//optionPane.putClientProperty(<br />// PopupFactory.forceHeavyWeightPopupKey, Boolean.TRUE);<br />optionPane.setWantsInput(true);<br />JInternalFrame modal = ateraihttps://www.blogger.com/profile/07647339065761407369noreply@blogger.comtag:blogger.com,1999:blog-4481781585418842840.post-18423666067579011592010-12-01T07:02:11.760+09:002010-12-01T07:02:11.760+09:00What about a Confirm dialog return value with this...What about a Confirm dialog return value with this?Abhttps://www.blogger.com/profile/16921269782988179431noreply@blogger.com