java - How to add scrollable JTextArea to jDesktopPane -
I was trying many opinions but none of them seam to work. This method is JTextArea Private static JTextArea getJArea () (if (jArea == faucet) {jArea = new JTextArea (); JArea.setBounds (new rectangle , 153, 468, 139)); jArea.setVisible (right); jArea.setLineWrap (right); jArea.setWrapStyleWord (right); jArea.setEditable (wrong); jsp.getViewport () (jArea) Add .;} Returned;} And I add this area with JDesktopPane this code snippet jDesktopPane.add (getJArea (), null); And it does not work, I tried to create an JScrollPane and assign it to JTextArea and added to JDesktopPane, but it also works You also have to use JDesktopPane to JInternalFrame is considered as the parent container for the object. JInternalFrame iframe = new JInternalFrame ("title", true, true, true, true); Iframe.setSize (180, 150); iframe.setVisible (true); Iframe.getContentPane () Add (New JScrollPane (New JTextArea ("TestText", 20,20)); Jdcustompen desktop = new jdcust...