¡@

Home 

java Programming Glossary: customcomponent

Java window contents resize, but not beyond a minimum size

http://stackoverflow.com/questions/7424178/java-window-contents-resize-but-not-beyond-a-minimum-size

javax.swing.JFrame import javax.swing.JLabel public class CustomComponent extends JFrame private static final long serialVersionUID 1L.. private static final long serialVersionUID 1L public CustomComponent setTitle Custom Component Test setDefaultCloseOperation JFrame.EXIT_ON_CLOSE.. JFrame.EXIT_ON_CLOSE public void display add new CustomComponents BorderLayout.NORTH add new CustomComponents BorderLayout.CENTER..

Drawing rectangles on a JPanel

http://stackoverflow.com/questions/7723591/drawing-rectangles-on-a-jpanel

import javax.swing.JFrame public class CustomComponent extends JFrame private static final long serialVersionUID 1L.. private static final long serialVersionUID 1L public CustomComponent setTitle Custom Component Graphics2D setDefaultCloseOperation.. JFrame.EXIT_ON_CLOSE public void display add new CustomComponents pack enforces the minimum size of both frame and component..