question: JPanel makeEditPanel ( JComponent comp , String label , String hint ) { JPanel panel = new JPanel ( ) ; panel . setLayout ( new BoxLayout ( panel , BoxLayout . Y_AXIS ) ) ; JPanel p = new JPanel ( ) ; p . add ( new JLabel ( rbx . getString ( label ) ) ) ; panel . add ( p ) ; if ( hint != null ) { panel . setToolTipText ( rbx . getString ( hint ) ) ; } comp . setMaximumSize ( comp . getPreferredSize ( ) ) ; panel . add ( comp ) ; panel . add ( Box . createVerticalGlue ( ) ) ; return panel ; }
target:  Utility for making Variable and Action editing Windows