Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to go about changing image at runtime?
How to go about changing image at runtime? [message #872898] Thu, 17 May 2012 03:28
George Smith is currently offline George SmithFriend
Messages: 4
Registered: March 2012
Junior Member
Hi, previously I had set up a way to display an image before the program runs using this code.

private JPanel getjPanelImages() {
if (jPanelImages == null) {
			String path = "3.png";
			jPanelImages = new JPanel(new BorderLayout());
			JLabel label = new JLabel(new ImageIcon(path));
			label.setHorizontalAlignment(JLabel.CENTER);jPanelImages.add(label);


I now want to be able to change that panels image if the user clicks a button, what do I need to do to do this?
Previous Topic:Can i distinguish the PartVisible event fired for detached view ?
Next Topic:Greater control over syntax coloring?
Goto Forum:
  


Current Time: Thu Apr 25 20:43:53 GMT 2024

Powered by FUDForum. Page generated in 0.08649 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top