Swing on Mac

N

Neil Collier

When I run my java applet on my Mac it does not work. It tries to use
some custom mac gui interface to show graphics in the nice mac 'Aqua'
theme, but this then fails to work. Does anybody know of this problem,
or know a way to stop the mac using this and force using the standard
Swing layer instead?
 
A

Andrew Thompson

When I run my java applet ...
URL?

..on my Mac it does not work.

Is your applet 1.3 compatible? AFAIU, Java has to be specially
packaged on Mac's in order to invoke 1.4.
...It tries to use some custom mac gui ..

A better group for GUI questions..
..interface to show graphics in the nice mac 'Aqua' theme,
but this then fails to work. ..

In what sense? Does your applet throw exceptions?
Does it load but display rendering artifacts?
Is it simply lazy?
<http://www.physci.org/codes/javafaq.jsp#exact>
 
S

Steve W. Jackson

Andrew Thompson said:
:On 13 Jan 2005 17:36:29 -0800, Neil Collier wrote:
:
:> When I run my java applet ...
:
:URL?
:
:> ..on my Mac it does not work.
:
:Is your applet 1.3 compatible? AFAIU, Java has to be specially
:packaged on Mac's in order to invoke 1.4.

That actually depends on multiple factors. Which Mac OS? Which
browser? And more.

If we're talking pre-OS X, then forget Swing. With some hacks, it's
possible to get Swing 1.1.1 onto OS 9, but it's not pretty and it will
NEVER be developed further.

If we're talking Mac OS X (and forget anything earlier than 10.2 if
you're wise), it depends partly on which version of Java is installed
and partly on what Java release is supported by the browser. Only
Apple's own Safari browser, of those I'm aware of, automatically
supports all available versions of Java that Apple has made available.
There's a Java embedding plug-in that lets Netscape and Mozilla-based
browsers use 1.4.x. I'm not certain if OS X 10.2.x can go all the way
to 1.4.2, or if it's limited to 1.3.1 or an earlier 1.4 release.

And FYI to Andrew, that packaging thing only applies to double-clickable
applications, not to applets. Browsers, I'm afraid, are a different
situation entirely.
:
:> ...It tries to use some custom mac gui ..

What does that mean -- and it's a Mac, not "mac". There is no custom
Mac GUI; there's the browser, where an applet is concerned. So far as I
know, look and feel issues are the same as in applications -- it'll take
the system's default L&F unless instructed otherwise, and that's Aqua.
:
:A better group for GUI questions..
:<http://www.physci.org/codes/javafaq.jsp#cljg>
:
:> ..interface to show graphics in the nice mac 'Aqua' theme,
:> but this then fails to work. ..

As Andrew said, what *specifically* is the result which results in your
statement that it "fails to work"?
:
:In what sense? Does your applet throw exceptions?
:Does it load but display rendering artifacts?
:Is it simply lazy?
:<http://www.physci.org/codes/javafaq.jsp#exact>

If you've got an version of Mac OS X from 10.2 onward, it has a
relatively good implementation of Java, somewhere between 1.3 and 1.4.2.
So details and specifics would be helpful here.

= Steve =
 
A

Andrew Thompson

On Fri, 14 Jan 2005 12:17:33 -0600, Steve W. Jackson wrote:

(snip)
And FYI to Andrew, that packaging thing only applies to double-clickable
applications, not to applets. Browsers, I'm afraid, are a different
situation entirely.
...

Aha! Thanks for the clarification.

It is good you popped by, I was looking around for you even when
answering this originally.

Now that someone who has 'been there - done that - got the battle scars'
has noticed this thread, I think I'll kick back and simply *read* further
posts.
 
S

steve

That actually depends on multiple factors. Which Mac OS? Which
browser? And more.

If we're talking pre-OS X, then forget Swing. With some hacks, it's
possible to get Swing 1.1.1 onto OS 9, but it's not pretty and it will
NEVER be developed further.

If we're talking Mac OS X (and forget anything earlier than 10.2 if
you're wise), it depends partly on which version of Java is installed
and partly on what Java release is supported by the browser. Only
Apple's own Safari browser, of those I'm aware of, automatically
supports all available versions of Java that Apple has made available.
There's a Java embedding plug-in that lets Netscape and Mozilla-based
browsers use 1.4.x. I'm not certain if OS X 10.2.x can go all the way
to 1.4.2, or if it's limited to 1.3.1 or an earlier 1.4 release.

And FYI to Andrew, that packaging thing only applies to double-clickable
applications, not to applets. Browsers, I'm afraid, are a different
situation entirely.

What does that mean -- and it's a Mac, not "mac". There is no custom
Mac GUI; there's the browser, where an applet is concerned. So far as I
know, look and feel issues are the same as in applications -- it'll take
the system's default L&F unless instructed otherwise, and that's Aqua.

As Andrew said, what *specifically* is the result which results in your
statement that it "fails to work"?

If you've got an version of Mac OS X from 10.2 onward, it has a
relatively good implementation of Java, somewhere between 1.3 and 1.4.2.
So details and specifics would be helpful here.

= Steve =
[/QUOTE]

have to disagree on the mac , swing interface.
it is not the same. as "standard swing."
Apple are very clear that it will follow the "mac spec for gui design"

it is close, but some things are very "mac"., it is a royal pain up the butt.

I have a number of complaints logged at the apple developer, site, some
outstanding for over a year.


then there is the , 100% not the same, evaluation of java code.

I have a little library, of single liners that work on the mac, but can crash
a windows or linux machine.

or the java code is a real slug on mac , but not on windows. ( and not gui
code either)

don't get me wrong, i develop on the mac, refuse to use windows at work and
have been an avid mac programer for over 10 years.

but jez, jobs me old mate, get ur F****g act together.

Steve
 
J

jonck

I have a little library, of single liners that work on the mac, but
can crash
a windows or linux machine.

Could I perhaps get a copy of this library? I work mainly on the Mac,
but my code is meant to work on Windows and/or Linux most of the time
as well. Therefore knowing what to avoid would be very useful to me.

Thanks very much, Jonck

P.S. my email address is:
"jonck van der kogel $ yahoo ! com".replaceAll(" ", "").replace('$',
'@').replace('!', '.')
 
S

steve

Could I perhaps get a copy of this library? I work mainly on the Mac,
but my code is meant to work on Windows and/or Linux most of the time
as well. Therefore knowing what to avoid would be very useful to me.

Thanks very much, Jonck

P.S. my email address is:
"jonck van der kogel $ yahoo ! com".replaceAll(" ", "").replace('$',
'@').replace('!', '.')

it's not that simple, you must also run your app on a windows machine ,
whenever you do any major modules, as there is always something else.

it relates to calling classes, depending on where and what type you init
variables & statics, you can cause problems.

also mac seems to drop packages & jar refs, a lot faster when they are not in
use. ( closes the files) Windows seems to hold onto them forever, once you
ref a jar, it seems the file is "locked" open for the life of the app.

here seems to be one problem
in theory when you start the application , it makes sense to get the current
user name, and lock it down.



// public static String theUser =
System.getProperty("user.name").substring(0,9); //max of 10 chars ( do not do
this it fails on anything but mac)


another serious issue relates to the language kits, in java you are supposed
to be able to "lock" to a specific language or disable foreign language
input, at textfield/area level.

on the mac it is impossible, and you can actually do some major damage to
backend databases. ( try it on any java app,running on a mac)
( in mac you can switch languages at will) ,but java on mac has no way to
prevent this. ( i asked apple to add a couple of system calls to the
"apple.java" library 1 year ago, to allow a java app to disable language
input.


steve
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top