The Artima Developer Community
Sponsored Link

Java Answers Forum
swing question help this newbie

3 replies on 1 page. Most recent reply: Jul 31, 2003 5:16 AM by KR F

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
sriram

Posts: 11
Nickname: scorpkris
Registered: Jul, 2003

swing question help this newbie Posted: Jul 30, 2003 12:05 AM
Reply to this message Reply
Advertisement
hello!!
2 questions:

i just wanna know how do i change the background color in my swing app. it is always gray in color. despite having a cool interface , it wont look good if the color cant be changed.

how can i make picture as the background and add components on the background. i hope u r understood my question.

sriram


FredrikN

Posts: 22
Nickname: fredrikn
Registered: Jul, 2003

Re: swing question help this newbie Posted: Jul 30, 2003 12:28 AM
Reply to this message Reply
Well, you can eg change the backgroundcolour with
containerVariable.setBackground(Color.Blue);

Read the java API to learn more

sriram

Posts: 11
Nickname: scorpkris
Registered: Jul, 2003

Re: swing question help this newbie Posted: Jul 30, 2003 3:16 AM
Reply to this message Reply
thanx

but my actual question was the second one.
can i make a picture as the background for a panel
or the form.

sriram

KR F

Posts: 10
Nickname: kr
Registered: Jul, 2003

Re: swing question help this newbie Posted: Jul 31, 2003 5:16 AM
Reply to this message Reply
I am not sure, but I think you question means:
How can I create an applet with a raster (digital image) as the background?


TRY:
// Download the image "image.ext" from the same directory that the applet resides in.
      img = getImage( getDocumentBase(), "image.ext" );



image.ext == image.gif

Good Luck

Flat View: This topic has 3 replies on 1 page
Topic: MOUSEOVER <something> Previous Topic   Next Topic Topic: How to realize my project

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use