Hi folks, I am using GridBagLayout as my layout manager. I have added a JTextArea named display and have then added the GridBagLayout to the ContentPane container. Now I would like to add a JScrollpane to the JTextArea and the code I am using for that is : //////////////////////////////////////// container.add(new JScrollPane(display); //////////////////////////////////////// but the JScrollPane is not coming up. What am I doing wrong? Please advise??
Can you not see the TextArea or are you not seeing the Scroll Bars of the ScrollPane? If the latter is true, by default, they will only appear if needed. You can change that by setting the ScrollBarPolicy to Always On.