In a GUI object, I have some class constants that are only used internally. Example 1:
private final int PREFERRED_WIDTH = MainWin.MAX_WINDOW_WIDTH;
private final int PREFERRED_HEIGHT = 50;
Example 2:
private final JButton helpButton = new JButton("Help");
private final JButton closeButton = new JButton("Close");
private final JLabel clearanceLabel = createClearanceLabel();
Should the members in EX1, EX2 be static??
These items are members of a GUI object, and there is only 1 instance of this GUI object during application runtime.
The nature of my question is about the best practices of when to use the "static" modifier for private class constants.
Thank you
Message was edited by:
PatrickFinnigan