Ask your own question, for FREE!
Computer Science 19 Online
OpenStudy (woodrow73):

If anyone remembers my question about setting a picture as a background for a gui application--

OpenStudy (woodrow73):

Nobody seemed to know - however through my studies, I've finally found out how. My original question was how I can set an image as a background in such a manner that I can place gui components ontop of the picture (labels, buttons, ect). op: http://openstudy.com/users/woodrow73#/updates/546b5221e4b0db9322933495 By using the JPanel's setBorder method, you can set the background to an image by using the MatteBorder (perhaps a few other type of borders). Here is an example: http://www.java2s.com/Code/Java/Swing-JFC/AnexampleoftheMatteBorderclass.htm

OpenStudy (woodrow73):

Also, if anybody is fond of 'serialization' within java, I have a question regarding the 'transient' keyword.

OpenStudy (woodrow73):

Using the MatteBorder approach is limited, because it is a border not a background -- though it can apply to the borders of buttons / jlabels / jpanels - enabling for buttons to be ontop of a picture or whatever you can think up.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!