Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Name: krT82822 Date: 03/08/2000 8 Mar 2000, eval1127@eng -- easily worked around. Could not find any still-open bugs re. this, so am filing new one. java version "1.2.2" Classic VM (build JDK-1.2.2-W, native threads, symcjit) Since there is no method to set a minimum size on a java.awt.Frame, the most obvious way to control this behavior is to extend the Frame object and override the getMinimumSize() method. However, when this is done, the minimum size that I set is not being enforced. Any other suggestions? Sample code as follows: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= import java.awt.*; public class ResizeTest extends Frame { private final Dimension m_dim = new Dimension(200, 150); public static void main(String args[]) { new ResizeTest("Resize Test"); } public ResizeTest(String title) { super(title); setLayout(new BorderLayout()); setSize(m_dim); show(); } public Dimension getPreferredSize() { return m_dim; } public Dimension getMinimumSize() { return m_dim; } } (Review ID: 102158) ======================================================================
|