Bug - Not A Bug Aesthetic issues running KoLmafia r11239 under JDK 7u5 on OSX

See screen shot attached to this post for what the problem is, exactly. All buttons look weird, because of the way the padding's set I'm guessing, so that they overlap each other.

Additionally, when logging in, the menu bar is unusable. Switching to another application then back to KoLmafia fixes this, but I'd imagine it would be unsettling to those who aren't aware of the workaround.
 

Veracity

Developer
Staff member
I just looked at your screen shot. It looks completely normal to me. I see no overlapping buttons.

I am confused.
 

Veracity

Developer
Staff member
Apparently I am blind. Please show me one button which is "truncated".

The first button is the Council. It is created using this:
Code:
		toolbarPanel.add( new DisplayFrameButton( "Council", "council.gif", "CouncilFrame" ) );
A DisplayFrame Button does this:
Code:
		super( JComponentUtilities.getImage( icon ), new DisplayFrameListener( frameClass ) );
		JComponentUtilities.setComponentSize( this, 32, 32 );
In other words, it makes a button with "council.gif" as the image and makes it 32 by 32.

council.gif looks like this:

council.gif

To my eyes, that looks exactly like how it is rendered in the in the screenshot.

I see no bugs in that screenshot. Since you apparently do see problems, roippi, I'll leave it to you.
 

roippi

Developer
Look at the DailyDeedsPanel :)

Edit: yes, "all buttons" was confusing (and incorrect) language. There are buttons on the top row, there are buttons on the AdventureSelectPanel, there are buttons on the DailyDeedsPanel. Only the deeds buttons have issues.
 
Last edited:

Veracity

Developer
Staff member
Look at the DailyDeedsPanel :)
OK.
(Compares it to my own)
What am I supposed to see? All the buttons look the same as my buttons.

Note that I, also, have OS X - although not a (potentially buggy) Beta version of Java 7 - and I expect that the OS X look and feel differs from what you are used to in Windows, roippi.

Screen Shot 2012-07-04 at 2.01.17 PM.png
 
Last edited:

Grotfang

Developer
I don't use OS X (linux and windows), and can't comment on the look and feel, but it seems odd that there is a black line on the left and right of those buttons (giving a 3d effect) and not on the top or bottom. Is that what you are referring to, wrldwzrd89?
 

Veracity

Developer
Staff member
Huh. Could be!

My initial reaction would be: I am really sorry that your Java is buggy. I run the latest version available from Apple, rather than one downloaded from (Sun. Oracle. Whoever is now supporting it.) and it works flawlessly for me and the Mac OS X look and feel is just fine.

It will be "interesting" if roippi can work around the bugs in your version of Java without changing the appearance for his and my versions of Java, which don't seem to have the display issue that yours does.
 
My big concern is that, going forward, this (potentially buggy) version of Java will be the ONLY supported Java in the future, and I don't want to see mass complaints from, say, Mountain Lion users (or from users of the successor to Mountain Lion, etc.). Java 7 from Oracle sure isn't perfect yet... but the dev team is working hard on squashing bugs - this much I know, I follow the development of the OS X port of OpenJDK 7 studiously. Apple won't offer or update their JDK any more once they hand off the task to Oracle. Based on both public information and rumors, that hand-off could occur VERY soon. Possibly as soon as later this month.

Anyway, in response to Veracity's remarks... I'm not entirely sure if this Daily Deeds button weirdness is caused by a bug in Java 7 for OS X or not. For all I know, it could be caused by the changeover from "heavyweight" AWT components to "lightweight" Swing components in ALL cases, regardless of whether the AWT or Swing classes are used.
 

Veracity

Developer
Staff member
OK, I downloaded and installed JDK 7u5.

I can confirm that the Java bugs you reported are present. I hope that Oracle will fix them in a subsequent release. Perhaps somebody should file bug reports?

In the mean time, I went to Java Preferences and moved Java 7 below Java 6, since I think it is a waste of time to try and debug around (hopefully temporary) glitches in a beta version of Java.
 

Veracity

Developer
Staff member
I'm not entirely sure if this Daily Deeds button weirdness is caused by a bug in Java 7 for OS X or not. For all I know, it could be caused by the changeover from "heavyweight" AWT components to "lightweight" Swing components in ALL cases, regardless of whether the AWT or Swing classes are used.
Look at my Java 6 screenshot.
Compare it to your Java 7 screenshot.

The code in KoLmafia is identical. In fact, I compiled KoLmafia into a .jar with Java 6 and ran it with Java 7 and got the same behaviors as you.
 
Fair enough, Veracity. It is certainly correct to say that, as of now, Java SE 7 for OS X is meant for developers to use, and not yet for end users, due to being incomplete. On that note, I would recommend NOT fixing this now, instead waiting for Java SE 7 for OS X to reach a consumer-ready release first.
 

roippi

Developer
Indeed. The tops/bottoms of those buttons in his screenshot are missing a couple of pixels. See the difference between the JComboBox and the attached JButton.

I'm tempted to chalk this up to Yet Another Aqua L&F*JRE 7 Bug. DailyDeedsPanel just uses a BoxLayout. No magic numbers or anything - the layout manager sets the height by getting the preferredSize of the elements. If I had to guess, the jbuttons are reporting the preferredSize of their contentArea but not including the border. i.e. there's not a whole lot I can do.

edit: whoa. another page of comments.
 
Last edited:
Top