Dynamic Jlist Java Swing Problems -
Hello, I'm trying to project a jellist using the word-builder plugin. All the codes related to here are:
JPNL panel_1 = new JPNL (); Panel_1.Setbound (26, 109, 629, 220); . Add MainFrame.getContentPane () (panel_1); Last Jellist List = New JLIS (); Panel_1.add (list); JScrollPane scrollPane = new JScrollPane (); panel_1.add (Scrollpane); BtnNewButton.addMouseListener (New MouseAdapter () {@Override Public Zero MouseClicked (MouseEvent arg0) {DefaultListModel & quot; String> MODEL1 = New DefaultListModel & quot; string & gt; (); model1.addElement ("hello"); model1.addElement ("hello"); Model1.addElement ("hello"); list.setModel (model1);}}); BTN New Button Setbound (364, 23, 89, 23); Add MainFrame.getContentPane () (btnNewButton) .; But when I click the button it appears < / p>
Overall, I want to be located on the left side of the UI instead of the list center and how can I customize it, font, color, border etc.
Thx in advance!
panel_1.add (list); JScrollPane scrollPane = new JScrollPane (); panel_1.add (Scrollpane); Should be better:
// panel_1.add (list); JScrollPane scrollPane = new JScrollPane (list); panel_1.add (Scrollpane);
Comments
Post a Comment