How, if at all, does one specify the size of a Java Popup? setSize on the contents Component does not get the job done regardless of when applied. I keep getting the same small square, serveral pixels on an edge. Is this documented somewhere? I've been trying to use docs.oracle.com, but nothing I've found answers the question. I truly hate the poke it and see what it does method of finding out what something is supposed to do. It never works.
From: Michael Hennebry hennebry@web.cs.ndsu.nodak.edu
How, if at all, does one specify the size of a Java Popup? setSize on the contents Component does not get the job done regardless of when applied. I keep getting the same small square, serveral pixels on an edge. Is this documented somewhere? I've been trying to use docs.oracle.com, but nothing I've found answers the question. I truly hate the poke it and see what it does method of finding out what something is supposed to do. It never works.
Google says: http://www.java2s.com/Tutorial/Java/0240__Swing/CreatingPopUpComponents.htm
JD
On Tue, 22 Jan 2013, John Doe wrote:
From: Michael Hennebry hennebry@web.cs.ndsu.nodak.edu
How, if at all, does one specify the size of a Java Popup? setSize on the contents Component does not get the job done regardless of when applied.
Google says: http://www.java2s.com/Tutorial/Java/0240__Swing/CreatingPopUpComponents.htm
Thanks. Google hadn't said it to me. What I did get was buried in a bunch of stuff for javascript.
That said, the example did not explicitly control the size fo the popup. I did notice that the example used a JButton instead of a JPanel. Using a JButton, setSize worked as advertised.
From: Michael Hennebry hennebry@web.cs.ndsu.nodak.edu
Thanks. Google hadn't said it to me. What I did get was buried in a bunch of stuff for javascript.
Google advice: -javascript removes javascript from the results
JD