Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: paintComponent(Graphics g)

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    18
    My Mood
    Amazed
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question paintComponent(Graphics g)

    Hi all,

    Apologies, I can't show any code, because I don't have any code, all I have is a thought that has been bugging me.

    How do I check the value of properties of 'g' in an, say outer class ?

  2. #2
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,424
    My Mood
    Hungover
    Thanks
    144
    Thanked 636 Times in 540 Posts

    Default Re: paintComponent(Graphics g)

    What you are asking is pretty meaningless. Without an example, or at least a better description, there are anywhere from zero to infinity different ways to accomplish your goal.

    It would not take very long to throw together a short program (in SSCCE form) that tests exactly what you're talking about- and you'd probably be able to figure it out on your own.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Throwing an Exception in paintComponent
    By jmack in forum Exceptions
    Replies: 1
    Last Post: January 31st, 2011, 08:12 AM
  2. why paintComponent method is not invoked?
    By ice in forum What's Wrong With My Code?
    Replies: 13
    Last Post: November 11th, 2010, 12:30 AM
  3. [SOLVED] paintComponent is not reading my private variables
    By Perd1t1on in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 25th, 2010, 02:31 PM
  4. graphics in job?
    By SweetyStacey in forum The Cafe
    Replies: 10
    Last Post: May 3rd, 2010, 03:29 PM
  5. Java GUI problem in paintComponent?
    By Richard_ in forum AWT / Java Swing
    Replies: 2
    Last Post: May 1st, 2009, 08:19 AM