Making the background white

Can someone help me make the background of my application white ?
All it does is display a simple curve in a window.
Here's the structure:
public class Curve
public static void main(String[] args)
JFrame window = new JFrame();
CurvePane pane = new CurvePane();
pane.setBackground(Color.white);
window.add(pane);
window.setVisible(true);
class CurvePane extends JComponent
public void paint(Graphics g)
//Draw curve here
It's a really simple program. But I just can't seem to get the background white. Any help at all would be greatly appreciated.
--Patrick                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

The setOpaque(true) statement worked except it created a few wierd errors.
I forgot to tell you that I programmed my curve to be able to be moved by the user. Using mouse listeners and so on. But now, after setting opaque to be true, it won't refresh the screen after the user moves it. The old line stays and is not erased.

Similar Messages

  • Hi,having diffulty having the background white, any pointers would be good, attached is a image

    We also have a number of similar difficult backgrounds that need doing.
    Regards Peter

    Ouch. Once you're left with the subject matter you are going to have  problems. There is colour bleed in the image you posted (perhaps not so much if you have a high-res original) and the background colour is present in both the shadows and in the reflections of the white handles and cable - all of which is going to make the edges a tough call. And even then there is still going to be some of the colour left in the reflections - which will look odd against a white background.
    The best results I've got so far is by placing a white fill layer above the image and then painting in black those areas of the imaage I want to show through. But those rough edges, shadows and reflections make for a messy result. You can get a feel for the problem by applying the 'Find Edges' filter - this shows how tricky it is to isolate the image from the background.
    Is the final result going to be produced in colour? I ask because if it is for use in a B&W publication, then some of the colour reflection issues can be resolved by discarding the colour information (i.e. converting the image to greyscale).
    Cheers,
    Neale
    Insanity is hereditary, you get it from your children
    If this post or another user's post resolves the original issue, please mark the posts as correct and/or helpful accordingly. This helps other users with similar trouble get answers to their questions quicker. Thanks.

  • Making the Background black in a Classic book

    Last year I made a book on iPhoto 6 and I made the background of some pages black and others white.
    I'm finishing a new book now and can't figure out how to change the background.
    I'm sure it's quite simple, but I can't find the answer in the help menu.
    The book type "theme" I'm using is "Picture Book". It's what I used last time and was able to make the background black (and the text automatically turned white)
    In addition, I was able to place small pictures on the inside flap of the book cover, but I can't seem to do that anymore either. How do I do that?
    Thanks in advance for your guidance.
    d

    Hi winks1123,
    Im pretty new to the iPhoto thing but I use iPhoto 08 and for hardcover books the inside flap I am able to change the layout and choose different settings. There is one which allows you to put an image and some text.
    I think that is what you mean.

  • Making the background transparent in export from cinema 4d to AE CC

    I'm using Cinema 4D to create a 3d object and then import it into AE CC.  When I import it in, the grey grid in the background is visible. I want to make the background transparent, so that all you can see is the object in AE.  How can I do this?

    This is not a matter of transparency. You are seeing what you are seeing because you are looking at the draft software rendering result.
    Choose Standard (Final) from the Renderer menu in the Cineware effect.

  • Making the background transparent for a .TIFF?

    I have a file with vector shapes and placed bitmap images. I want to export as a .TIFF and have the background transparent. How do you make the background transparent in CS5.5?
    Thanks.

    As long as your file is not too huge you can also copy it and paste into Photoshop. I often find this quicker than exporting.
    You can then save in whatever format you please.
    This method also gives you the opportunity to copy/paste your Illy file in parts, thereby producing more layers in Photoshop and giving you the opportunity to add Photoshop layer effects.
    Use corner rectangles to ensure registration between layers – just ask if you don't know how to do this.

  • Making the background a color

    HI I can make the background of a field of group of headings really a color other than the default however this is in  a cross tab, How can this be done for non cross tab fields?

    Hi Philky,
    I could see Background option in CR 10, is this option you want in cross tab or in standard reprot.
    Please try to install service pack 6 and check the option.
    Thanks,
    Sastry

  • My Adobe Acrobat 10 Pro creates PDFs with a graph background.  How do I make the background white?

    My Adobe Acrobat 10 Pro creates PDFs with a GRAPH background.  How do I make the scanned documents have a normal white background?

    This particular forum (sharing and storage) was created to help those transitioning from Photoshop.com to Adobe Revel. I will move your post to the correct forum so that it can get proper attention.
    We also have many other forums relating to other Adobe products at: http://forums.adobe.com.
    Out of curiosity, can you tell me how you found our forum page?

  • NOTHING i do to this Ipod touch is making the BLANK WHITE SCREEN go away......

    Please help! I now hook my ipod touch up to my P.C, and it is NOT RECOGNISING my ipod!! Heres the problem AGAIN, let me make myself a little more clear on WHAT a stupid thing i did earlier..... I receieved a message (ON MY IPOD)  saying a new version of I.O.S 6 is available, so it says I needed at least 50% charged, OR had to be plugged in, so I PLUGGED in, and hit the button to update to newest version, then did what I had to do, came BACK to the iPod at 30 min later, and the bar seemed to not be moving, and i had to go to work, so i FORCED A SHUT DOWN by holding the home and the top button together, as i normally would to shut the thing down if something was jammed or whatever....so I did that, and it came back on BY ITSELF with the apple sign, then 5minutes later, the blank screen came up, and NOW every single time I TRY shutting it down, it WON'T STAY OFF, it comes right back on to the apple sign, then back to blank screen every time, can't get it to stay off! And now when I hook to my PC, it's not recognizing the iPod, I don't know how to recover it, cuz the iPod WON'T STAY OFF for me to do it!! And another thing, i let the ipod die completely, then plugged it in to charge, then it came back on as usual by itself, and still done the same thing!! All because i stopped an update in the middle of it updating!! It seems as if i wiped it completely out! But theres gotta be a way to restore??? need to speak with someone on the phone, cuz I don't have the money to spend right now on an apple support person!

    Please please READ what I have written before u respond,PLEASE!!because I MANUALLY STOPPED THE UPDATE TO IOS 6 WHILE IT WAS IN THE MIDDLE OF UPDATING (by forcing shutdown in the middle of it all..) and when it turned back on it went right to the white blank screen and has been that way EVER SINCE!! i cannot put in recovery mode, cuz every single time I SHUT my ipod down (by holding the power, and home button at the same time till it shuts down...) it DOES NOT show me the slide bar to power off, and it immediately shuts down (goes black..) then immediately STARTS BACK UP BY ITSELF and shows the APPLE LOGO for about 5 minutes, then goes RIGHT BACK TO THE WHITE, BLANK SCREEN!!!! It will NOT STAY OFF, it WILL NOT SHOW ME THE SLIDE BAR TO POWER OFF MANUALLY, and when I force shutdown, it immediately comes BACK ON BY ITSELF!! And then nothing but white screen! My PC COMPUTER will NOT recognize the iPod as being plugged into USB on my computer for me to RECOVER this IPod, so I do not know what else to do???  I have updated to the latest version of iTunes, and STILL NOTHING!!! This is my kids iPod that I screwed up here, and I am very upset! It's a 4th gen, 32gb iPod touch that is NOT CHEAP at all, and I am freaking out man!!! What do I do?

  • How do I change the background color on pages I try to print or view?

    when I installed/downloaded Mozilla/Firefox originally, I "set" an option that changed the "background" color for certain pages that I download. When I try to print some pages, the entire background (or some blank spaces) is printed in a purple color. (It uses too much ink to print a page.)
    Can't find where I can change the original settings I used and make the background white, or no color at all.

    Specifically to add a background color, no. The only workaround I am aware of is to add a text box to the document format and expand it to cover the entire page. Available colors will be limited, and you may need to experiment with the opacity.

  • How to make the background move over when a movie clip hits the edge

    ok so the idea here is to make a page with written content on it. the conent will not be able to be seen unless the user hits the arrow keys on there key board. So i need to make a group of objects i can make into a movie clip and than inside that movie clip make an animation that plays the squirrel running. i will pause here to ask two things i dont know how to do i want the squirrel to have an animation when standing still where it flicks its tail (like a real squirrel would). and also how would i flip the squirrel so when the left key is pressed it points left and when the right arrow is pressed it faces left? and my main question when it reaches the edge of the stage the extended background that runs off stage moves over to reavel more content. as well as not have the squirrel run off stage? in short i am using the squirrel to view the full pages content.

    You're asking for quite a bit and aren't likely to get anyone to hand you a detailed solution.  Here's some things to think about.
    As far as flicking the tail goes, that's something you'll have to work out as an animation.  You could do it as a timeline animation and/or as a coded animation where you adjust the rotation and other properties of the tail.
    Getting the object to face left and right ican be a simple matter of changing its xscale property from 1 to -1 depending on which way it normally faces (1).
    If you don't have a problem making the squirrel move to the edge, then you should have no problem making the background move either.  You just need to continually check the squirrel x property to know when it hits the edge.  Personally, I would only move the background and leave the squirrel in the center.

  • Using Photoshop elements 11 on a PC, when I put new photo on screen to edit the background goes to black which messes me up when making a thumbnail that has black background.  How do I get the background to white as it was originally?

    Using Adobe photoshop elements 11 on a PC.  When I put a photo up to edit the background on the page goes black.  I need it to go back to white to do a thumbnail that has black background so I can see it.  How do I do that.  It used to be white on the background.  Don't know how I got it all black. Can you help?

    If you mean by "background" the blank work area that presents when you open the Editor, then right click on it and reset to white.
    If I have this wrong, please rephrase your inquiry.

  • The infamous white background...HELP!

    I am creating a little rpg game, and the sprites i use always seem to have a white background, that isnt transparent.
    even if i set the background color of the JPanel to clear, there is still the white background of the picture itself that always gets in the way.
    is there any way to make the background of the actual picture clear, and make it stay clear when making it an ImageIcon?

    it turns out i was using a Panel.
    No matter what i try, i cant set the background of the panel to transparent.
    even
    setBackgrond(new Color(255,255,255,0));
    doesnt work for some reason.
    i dont want to use JPanel because it flickers.

  • How can I change the background of a running webpage on my own. Example Facebook I want to change its backround color from white to black just in my view not for all

    How can I change the background of a running webpage on my own. Example Facebook I want to change its background color from white to black just in my view, not for all. Cause I really hate some site with white background because as I read for an hour it aches my eyes but not on those with darker background color.

    You can use the NoSquint extension to set font sizes (text/page zoom) and text colors on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/

  • I have trouble reading in Black and White. changing the background color for all

    I have trouble reading in Black and White. On my PC I can change the background  color (and I am not just talking about for a word or pages document) but for eveything so anything that was a white background I can put in what ever color I like but it still prints in Black and white.. I can't see how to do this on the Macbook air. on my PC I do this in display. Sort of putting colored film over the screen I dont know what to do. Can anyone help?

    Hello Floridamacbookpro,
    You may be interested in the 'invert colors' Accessibility feature. This can be invoked by pressing the Control, Option, Command, and 8 keys on your keyboard. This only affects your display, and does not have any affect on printed items.
    Mac OS X displays inverted image colors (white on black, reverse type)
    http://support.apple.com/kb/HT3488
    Cheers,
    Allen

  • In iTunes, my printing is white and the background is black, How do I change it back to white printing on a black background.

    In my iTunes store, the printing is white and the background is black and I have forgotten how to change it back to black printing on a white background? I know that it is a simple answer, but right now I cannot think of it.
    Also, what is the "other" when you are syncing an ipad in itunes and in my case the other is more than half of my 64Gb. How do I find out what it is and then get rid of it if I want to?
    Thanks

    Hi gramie47,
    Sorry to hear that didn't resolve the issue.
    I checked online for issues printing from the Internet, found a couple of things you can try. Most likely it is a setting that needs to be changed in the browser settings, since the printer prints fine from the computer.
    From Internet Explorer, go to File, Page setup, Remove check from "Printer background color and images" if checked, or vise versa, to see if that helps.
    Here is another document you may take a look at.
    Map Images May Not Print Properly When Using Internet Explorer.
    If you continue to have issues, contact your Internet Provider for further assistance.
    Thank You.
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
    Gemini02
    I work on behalf of HP

Maybe you are looking for

  • How do I get Watermark to show in the Edit drop down in LR 3.4?

    There is no Watermark function under the Edit drop down box in my Lightroom v 3.4  How do I get it to appear so I can use it?

  • Browser show Korean Language on its own. Am I being hacked or is it Firefox?

    the tabs at the top of my browser displays in Korean in spurts. when it does it takes up every tab and the browser is slower. Am I being hacked or is this Firefox?

  • Connecting Mac Pro to Dual G5

    I apologize if this question has been asked before, but I could not find it. I have a new Mac Pro that I want to connect to my old, dual G5 via ethernet. What I'd like to be able to do is connect the Mac Pro (with a keyboard and monitor) to the G5 (w

  • Iphoto album synced issue...

    Has anyone noticed once you sync an iphoto album and open pictures, then while your on the "photo albums" screen and press the home button and the app closes there is a white pixel that stalls for a second in the middle of the third row of apps? I kn

  • Ipod touch 2g trouble while charging

    i had my ipod for +- 3 years, but 2 months ago charging it became a problem. when i connect it to pc it doesnt start charging, when it finnaly starts charging the most small movement makes it stop, it keeps shifting from charging (ray on battery)  to