Jscrollpane not updating

I think this is a common problem but I havent found a solution yet.

I have a process which takes a long time, and I at least wants to show something, anything, on the gui, to let the user know that the program is still running (and it is not hanged or something). Hi guys Just wondering is it possible to get a realtime update (refresh, repaint or something) of a Text Area in Swing?

I added: Judging by your screenshot you didn't comment panel.add(list); and left panel.add(scroll); commented. Otherwise your list would've been on top of the gui, and not below Tax.

I was going to make an instance of the class first, but I decided to keep everything static so everything could stay in one class/file which I need to upload online.

Separating your gui components will make your gui look better and actually make it easier to work with.

(Much simpler to layout components)Also, you might want to place some of your components inside of separate JPanels.

I created a swing GUI with a text area to display the process of the application. My problem is, each log that join to the textarea go to the first line...

like this: ----------------- third log_______/\ second log_____| first log_______ | ----------------- I want to do the inverse...

My JComponent generates an event when its size changes.

like this: ---------------- first log_______ | second log_____| third log______ \/ ---------------- Someone can help me ...public void create And Show GUI() { // Creates the JFrame JFrame my Frame = new JFrame("Inferno Shoutbox"); //Creating the text area, and makes it non-editable JText Area my Area = new JText Area(5, 5); my Editable(false); //Writes a simple message to the JTex TArea my Area.append(get() new Line); //Loads the text Area on our applet my Content Pane().add(my Area, Border Layout.

CENTER); //Sets the size of our applet my Preferred Size(new Dimension(800, 600)); // Sets the frame visible, ...

To get rid of this static design, use something like this in the main(String[]....) the "panel.add(list);" line was actually just a quick experiment and now commented out.

Another thing, all of methods and variables are static.

Leave a Reply