Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stefu

[java] How to use viewport?

This topic is 5455 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I am writing a track editor where I should have a large area and draw curves.. how do I do this ion Java? Is there simple tutorial on what I need to derive from, what functions to override and so on.. I am using Swing. I tried viewport, override paint(Graphics g) but I don''t get any scrollbars.. and Id like to paint only the area that is required to update.. I can only do it by creating big BufferedImage and paint it, but it is not zoomable then.. So simply tutorial or class that does what I want..?

Share this post


Link to post
Share on other sites
Advertisement
see JScrollPane
http://java.sun.com/j2se/1.4.2/docs/api/index.html

and if you have java webstart insalled try "SwingSet 2 app" !

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!