Pressed icon behaviour

  • Thread starter Dirk Bruere at NeoPax
  • Start date
D

Dirk Bruere at NeoPax

Matt said:
It sounds like the platform shows button "press" behavior by shifting the
icon. Are these JButtons or AWT buttons? (I'm guessing AWT with heavyweight
delegate) Which platforms / jvm?

Matt Humphrey http://www.iviz.com/

Swing.
Not sure what JVM. All I know is that I keep the Java stuff up to date
from Sun (as of last week). They are both running on a Windows XP system.

Any way to force that key movement behaviour? - it looks good.

--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff
 
J

John B. Matthews

Dirk Bruere at NeoPax said:
Swing. Not sure what JVM. All I know is that I keep the Java stuff up
to date from Sun (as of last week). They are both running on a
Windows XP system.

Any way to force that key movement behaviour? - it looks good.

You might look at SwingSet2, an example application that is often
included in the SDK. It allows one to see how standard Swing components
look with various Look & Feel settings. A changing bevel highlight
causes apparent motion in the Java (Metal) L&F.
 
R

Roedy Green

Slight oddity.
I have an app with icon buttons.
On one machine with a touch screen the icons move slightly when pressed.
On others that doesn't happen.
What governs that behaviour? AFAIK all machines are running the same JRE


You can private many different icons to represent the state. This
effect would be independent of any wiggling a particular JVM/Swing
implementation does. You could simulate the effect with an image a few
pixels to large and offsetting the image left and right for pressed
and plain versions.

see http://mindprod.com/jgloss/jbutton.html for code.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Learning is not compulsory... neither is survival."
~ Dr. W. (William) Edwards Deming (born: 1900-10-14 died: 1993-12-20 at age: 93))
 
D

Dirk Bruere at NeoPax

Roedy said:
You can private many different icons to represent the state. This
effect would be independent of any wiggling a particular JVM/Swing
implementation does. You could simulate the effect with an image a few
pixels to large and offsetting the image left and right for pressed
and plain versions.

see http://mindprod.com/jgloss/jbutton.html for code.

Yes - I guessed that when reading the button menus.
Just wondered whether there was a simpler method by ticking a box somewhere.

--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff
 
R

Roedy Green

Not sure what JVM. All I know is that I keep the Java stuff up to date
from Sun (as of last week). They are both running on a Windows XP system.

Any way to force that key movement behaviour? - it looks good.

See http://mindprod.com/jgloss/laf.html

See if it is a side effect of the look and feel. You can force a
particular look and feel.

LAFs have great latitude in how the various button states look by
default.

--
Roedy Green Canadian Mind Products
http://mindprod.com

"Learning is not compulsory... neither is survival."
~ Dr. W. (William) Edwards Deming (born: 1900-10-14 died: 1993-12-20 at age: 93))
 
R

Roedy Green

You can private many different icons to represent the state. This
effect would be independent of any wiggling a particular JVM/Swing
implementation does. You could simulate the effect with an image a few
pixels to large and offsetting the image left and right for pressed
and plain versions.

Let me try that again.


You can PROVIDE many different icons to represent the state. This
effect would be independent of any wiggling a particular JVM/Swing
implementation or L&F does. You could simulate the effect with an
image a few pixels TOO large, and offsetting the image left and right
for pressed and plain versions.
--
Roedy Green Canadian Mind Products
http://mindprod.com

"Learning is not compulsory... neither is survival."
~ Dr. W. (William) Edwards Deming (born: 1900-10-14 died: 1993-12-20 at age: 93))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Changing button icon on pressing 9
Official Java Classes 10
Resizing jpg for text box or icon 15
File over network timeout 3
Can an Applet beep? 4
Sorting a JList 4
ListModel name 10
Free keyboard applet 5

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top