Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Refreshing a Window in Java

Name: HerkDerk !FpuBmVY37Q 2012-05-11 12:18

I'm using the JFreeChart library to draw charts in Java, blahblah...

I need the chart to draw on button click, how do I refresh the window without having to use setVisible(false) then setVisible(true)?

repaint() doesn't do shit.

Name: Anonymous 2012-05-11 13:15

GC is shit.

Name: Anonymous 2012-05-11 13:25

>>4

I agree 100%, which is why I fucking hate Java. That said, I need to use it for this asshole class, and I can't figure this shit out.

You have to be kidding me, this is such shit. This doesn't even work:


            //Add new chart to panel & update window
            window.invalidate();
            window.remove(panel);     //Remove panel from window
            panel.remove(chartPanel); //Remove chart from panel
            panel.repaint();
            panel.add(chartPanel);    //Add new chart to panel
            window.add(panel);        //Add panel back to window
            window.validate();

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List