|
Quote:
|
|
I have added the code for your kind reference. I am trying draw some vertical lines in drawPanel and the size is not changing. So I am unable to use the scrollbar. I didnt use any layout managers as I used netbeans and the layout manager I used is freedesign just drag and drop.
|
I suggest that you learn how to use other layout managers, managers that may help you resize your panel better. You can read up on them here:
Lesson: Laying Out Components Within a Container (The Java™ Tutorials > Creating a GUI with JFC/Swing)
Also, when posting code here, please use code tags so that your code will retain its formatting and thus will be readable -- after all, your goal is to get as many people to read your post and understand your code as possible, right?
To do this, highlight your pasted code (please be sure that it is already formatted when you paste it into the forum; the code tags don't magically format unformatted code) and then press the code button, and your code will have tags.
Another way to do this is to manually place the tags into your code by placing the tag [code] above your pasted code and the tag [/code] below your pasted code like so:
|
Code:
|
[code]
// your code goes here
// notice how the top and bottom tags are different
[/code] |