Very weird problem: I have a JTextPane within a JScrollPane, and a JSlider for resizing the text. If I increase the text size, the scroll bar moves up (normal). My goal is to keep the scroll bar at the bottom, if it was at the bottom before resizing the text. The weird thing is, I can ONLY get it to
Tag: jslider
How can you draw rectangles on a JPanel?
I’m trying to create a program that generates rectangles using a slider. The user should be able to move the slider and rectangles should appear on the JPanel above the slider with random positions. I have tried running the program but I’m still unable to display anything, I move the slider but nothing appears on screen. I have tried coding