comp.lang.java.help
  Home FAQ Contact Sign in
comp.lang.java.help only
 
Advanced search
July 2008
motuwethfrsasuw
 123456 27
78910111213 28
14151617181920 29
21222324252627 30
28293031    31
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.java.help Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Problem with AffineTransform on Swing Components         


Author: xethyr
Date: Jul 1, 2008 12:54

When using AffineTransform on Swing components, the graphics of each
component is updated, but the bounds are not. How can I properly set
the bounds of a Swing component to match that of the AffineTransform?

I'm using AffineTransform to scale (zoom in/out) Swing components, and
while the graphics successfully zoom in/out, mouse events stop working
properly. So, I think I either need to somehow "trick" every
MouseEvent and recalculate each point into the AffineTransform's
coordinate space, or I need to update the bounds of each Swing
component for every zoom. However, I'm not sure how to retrieve the
width and height of a component within the AffineTransform's
coordinate space. Does anyone know how to do this?
4 Comments
  Compilation puzzle         


Author: Lethal Possum
Date: Jul 1, 2008 09:24

Hello everyone,

I stumbled upon a java compilation puzzle that I would like to discuss
with you.
Let's say I have two classes Foo and Bar defined as:

public class Foo {
}

public class Bar {
public Bar(String s) {}
public Bar(Foo f) {}
}

I can compile Foo first and then I can compile Bar with Foo in javac's
classpath. So far, so good.

Let's say now that I have the following Main class:
Show full article (1.51Kb)
5 Comments