Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

How do I add a picture gui behind my java gui.

For exmaple I wanted to take just the regular like this:

[img]http://www.mathworks.com/help/matlab/creating_guis/overview_gui_options.png[/img]

To something like with my own photoshoped picture in the background.

It's hard to explain. I see people in rate my gfx doing GUI's all the time and I want to know how to input it in my program.

ATM I'm using netbeans gui creator.
You can set the Background Image or color to anything you want. Google Java set JPanel, or frame, background image.

~ Singularity ~
[Image: 9N6Aq1f.gif]

You can use a JLabel and set an icon, or you can hook onto the paint function and draw your image using java.awt.Graphics2D.
(Mar 6, 2013 05:43 PM)Coelho Wrote:  You can use a JLabel and set an icon, or you can hook onto the paint function and draw your image using java.awt.Graphics2D.

This. Using the JLabel to set an image as it's "icon" is probably the easiest way of displaying images. I am truly not familiar with any other method.
For Java you must set a JPanel in order to display background-images (without to override anything).
Its maybe not enough to use any plain jframe/jdialog.

Within the JPanel, you set the image and then draw your gui elements over it.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by CryptMay 28, 2018 07:49 PM 9 264 May 28, 2018 07:49 PM
Last Post: quarkE
[.NET] by DailyTrendsJun 10, 2017 03:21 PM 4 174 Jun 10, 2017 03:21 PM
Last Post: fxbghacker
[.NET] by GoogleRezzzAug 19, 2015 10:34 PM 2 276 Aug 19, 2015 10:34 PM
Last Post: GoogleRezzz