This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Graphics and Swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Graphics and Swing" Watch "Graphics and Swing" New topic
Author

Graphics and Swing

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Are the Graphics and Graphics2D classes available to work in a Swing Application. All I ever see them in is an applet.
If so, I need to draw a line across my JPanel. Does anyone know how?
------------------
Happy Coding,
Gregg Bolinger


GenRocket - A Test Data Generation Platform
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

You could do it that way... if you wanted to...

However, I think in your case a JSeparator would serve the purpose much more nicely...




JSeparators! They're not just for JMenus any more!


-Nate
[This message has been edited by Nathan Pruett (edited September 18, 2001).]


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Thank you so much!! That helped out. I got it done. I was even able to change the color of the serparator which is what I needed to do.
Thanks again!!

------------------
Happy Coding,
Gregg Bolinger
Mary Shell
Greenhorn

Joined: Jan 15, 2003
Posts: 15

Thanks for the help. Just what I needed too.


Thanks,
Mary
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Graphics and Swing
 
Similar Threads
Is that graphics in syllabus
When to use abstract class instead of interfaces
Casting /2D Graphics
abstract method
Circle looks bad