AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mac OS X Differences / Problems?

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits
View previous topic :: View next topic  
Author Message
Jim Crowell
Guest





PostPosted: Mon Nov 17, 2003 4:33 pm    Post subject: Mac OS X Differences / Problems? Reply with quote



Hi,

I am developing a Form Centric Application using jdk11.3.1_09 on a Linux
System. On the Linux node, I create .jar files for testing my stand alone
app on a Win XP Pro System and an Apple PowerBook running Mac OS x.2.

I just started the test effort on the PowerBook and have discovered the
following problem:

I create a new instance of a JScrollPane [scrollPane]. I set the Vertical
Scroll Bar Policy to "scrollPane.VERTICAL_SCROLLBAR_AS_NEEDED".

To Control the LAF Colors I get a JScrollBar [vScrolllBar] instance of the
'scrollPane' Vertical Scroll Bar and set the background Color as follows:

JScrollBar vScrollBar = scrollPane.getVerticalScrollBar(); // Line 1
vScrollBar.getComponent(0),setBackground(Color.pink); // Line 2

The above works fine on the Linux and Win XP Systems. On the Mac OS X.2
system, I get an "ArrayIndexOutOfBounds" error on the 'getCommponent(0) line
[line 2 above].

Note: I also tried setting the Vertical Scroll Bar Policy with
"scrollPane.VERTICAL_SCROLLBAR_ALWAYS" and received the same error on the
Mac OS system.

It looks like the Mac OS [ver 1.3.1] does not add the Scroll Bar components
to the 'JScrollBar' instance until it is ready to display the Scroll Bar
whereas Linux and Win XP sets the components when the object is instanced.

Questions:
1. Is the above code poor in that I should have done a
'vScrollBar.getComponentCount()' check before assuming that the 'vScrollBar'
instance has setup the Scroll Bar Components?
2. Is there any place where I can see a list of 'jdk' platform differences
to assist my integration effort on the above platforms?

Thanks,
Jim.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java GUI Toolkits All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.