Exception in thread "AWT-EventQueue-0" java.lang.StringIndexOutOfBoundsException: String index out of range: 4
at java.lang.String.charAt(String.java:687)
at Sesiune.init(Sesiune.java:595)
at Sesiune.itemStateChanged(Sesiune.java:294)
at java.awt.Choice.processItemEvent(Choice.java:604)
at java.awt.Choice.processEvent(Choice.java:571)
at java.awt.Component.dispatchEventImpl(Component.java:4583)
at java.awt.Component.dispatchEvent(Component.java:4413)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Problem solved in cross-post, thanks to Maxideon and without need for actionlisteners at all. Quite elegantly too, I may add (I wish the solution were mine).
One other posisibility. If basicPanel is the only thing you are adding to the contentPane, then instead of adding it as BorderLayout.CENTER this way: getContentPane().add(basicPanel, BorderLayout.CENTER);
consider instead setContentPane( basicPanel );
You wouldn't think that makes a difference, but I have seen a strange problem solved this way.
the guy seems to have truble with resizing the frame, to match his img...and i don't think that borderLayout have someting to do with it...Anyway we're deviating from my problem....https://coderanch.com/t/446219/Swing-AWT-SWT-JF.../java/Sizing-application-image
Agree. See this link in the other posting. Notification like that should apply to both fora.
OK I see what you mean. Still, I don't imagine you are too happy about all those action listeners just to trigger a repaint. If I was looking for an easier way I'd try without all that. But I guess you thought of that.