If you read the JavaDocs for MouseListener MouseEvent you will find your
answer much more quickly than if you send an email to this list and wait for
a response.
One way to do this is use the MouseEvent object (that is an argument to your
mousePressed() ) and call getButton() on that MouseEvent
This is a basic access modifier issue. PrintQuality's [int] constructor is
PROTECTED, so only a subclass of PrintQuality, OR another class within the
javax.print.attribute.standard package may access that protected
constructor.
The [int] constructor for OrientationRequested is also protected,
it to a file.
Any help would be appreciated!
Thanks.
Rob Ross
[EMAIL PROTECTED]
===
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message signoff JAVA2D-INTEREST. For general help, send
Can someone give me some pointers on how I go about creating a simple JPEG
image and saving it to a file?
I want to be able to draw a simple square with a given width/height in
pixels, filled with a solid color given by a RGB value, rendered at 150
DPI.
1) create a new image object
2) get
So, say I have drawn a 100x100 pixel blue square in my Graphics (at 72
DPI)...how do I turn it into a JPEG at 150 DPI?
I believe you aren't thinking about this right.
java images, eg buffered images are created in pixels not dpi.
once you know that the phrase above says you want to
For extra credit:
Do you really want 150 dpi in the output jpeg? (ie so that viewers would
also scale it appropriately?)
If you want to save resolution information then YES you do have to
do more. Go to the website and locate the imageio guide in pdf, ps or
html and check out the JPEG
I just bought this book and can't get the demorunner or scriptrunner java
apps to work on either Mac OS X 10.2.6, or WinXP. Both are running some
version of JDK 1.4 (1.4.2 on windows, 1.4.1 on OS X).
On the Mac, if I double-click the demorunner script file (I've chmod'ed it
to be executable) OR
Thanks for the quick response Vincent. I can now get the demos running, at
least on Windows XP.
I wasn't sure where I was supposed to place the demos.properties file, as
I couldn't find an existing file with that name. I placed it in the root
directory of the examples folder, at the same level
- Original Message -
From: Vincent Hardy [EMAIL PROTECTED]
On Mac OS, it looks like there is a path issue. The DemoRunner code
invokes a script that is not found. I suggest you try to run: runsnippet
ColorTransparency for example and see if that works from the command line.
On OS X,
I
required in the JVM to make
this happen. But since both OS X and WindowsXP seem to do this all the
time now, I have to assume most of the hard code already has been
written in those platform's native libraries.
Rob Ross
Senior Software Engineer
E! Networks
[EMAIL PROTECTED
This is semi-swing related, but since there's not a swing-interest list and since it's
also semi 2D related, I thought I'd try here.
I learned this past JavaOne that every swing app I have ever written has been broken,
as I often do
public static void main(String[] args)
{
JFrame f = new
images even
in a headless environment, and I hope my memory is correct.
What's the proper way to do this?
Thanks!
Rob Ross, Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny you access to information, for in his
this breaks all kinds of user interface guidelines, but I really
need it for a psychology experiment. There are lots of java routines
for reading the mouse position, but I need one that will set the mouse
to a new location. Any ideas?
Thanks,
Tom
look at java.awt.Robot.mouseMove()
Rob Ross, Senior
to do, like scrolling a
JTable or JTree to some specific position, while showing all the
intermediate scroll positions to the user.
Any pointers?
Thanks,
Rob Ross, Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny
on Tuesday nights; other good places to
pick our brains on this and other subjects...
Chet.
Hey that's great! I plan on being there.
Rob Ross, Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny you access
!
Rob Ross, Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny you access to information, for in his
heart he dreams himself your master. -- Commissioner Pravin Lal
that craps out
on me, so I'd like to change the setting as needed depending on what
is being drawn.
Thanks!
Rob Ross, Senior Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny you access to information, for in his
heart he
pointers?
Thanks,
Rob Ross, Lead Software Engineer
E! Networks
[EMAIL PROTECTED]
---
Beware of he who would deny you access to information, for in his
heart he dreams himself your master. -- Commissioner Pravin Lal
where I can write
out the java.awt.Image to an OutputStream (ie, the same bytes that
would end up in the new file as mentioned above)? If I can get this
much, I can take it the rest of the way.
Thanks!
Rob Ross, Lead Software Engineer
E! Networks
[EMAIL PROTECTED
19 matches
Mail list logo