This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 69651

Summary: [50cat] TitledBorder more Mac OS X like
Product: platform Reporter: lordy <lordy>
Component: Window SystemAssignee: lordy <lordy>
Status: NEW ---    
Severity: blocker Keywords: UI
Priority: P3    
Version: 5.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: patch of core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaLFCustoms.java
screenshot broken
screenshot fixed
NSBox

Description lordy 2005-11-30 18:55:36 UTC
[ JDK VERSION : 1.6 ]

The TitledBorder implemention don't look native. The idea of JPanel  
with TitledBorder is the same in Cocoa in the class NSBox.

But it isn't possible to fix it that it look like NSBoxes because that 
need to implement the whole PanelUI.

So i take AquaRoundedLowerBorder and add drawing for upper 
half.
Comment 1 lordy 2005-11-30 18:56:04 UTC
Created attachment 27456 [details]
patch of core/swing/plaf/src/org/netbeans/swing/plaf/aqua/AquaLFCustoms.java
Comment 2 lordy 2005-11-30 18:57:14 UTC
Created attachment 27457 [details]
screenshot broken
Comment 3 lordy 2005-11-30 18:58:03 UTC
Created attachment 27458 [details]
screenshot fixed
Comment 4 lordy 2005-11-30 18:58:51 UTC
Created attachment 27459 [details]
NSBox
Comment 5 David Simonek 2006-01-09 15:47:31 UTC
Passing to Milos, thanx for the patch. I hope it doesn't affect appearance on
other OS.
Comment 6 lordy 2006-01-09 15:51:39 UTC
It can't affect appearance on other OS because it add the border in the AquaLFCustoms.java to laf, which is 
only called on Mac OS X.
Comment 7 Milos Kleint 2006-01-12 10:15:28 UTC
I applied the patch locally, but when opening the Options dialog, I get the
following Exception.
I don't quite follow the code and the idea behind border's cooperation with drop
shadowborder..




java.lang.NullPointerException
	at
org.netbeans.swing.plaf.aqua.AquaTitledBorder.isFloating(AquaTitledBorder.java:52)
	at
org.netbeans.swing.plaf.aqua.AquaTitledBorder.getBorderInsets(AquaTitledBorder.java:44)
	at javax.swing.border.TitledBorder.getBorderInsets(TitledBorder.java:416)
	at javax.swing.border.TitledBorder.getBorderInsets(TitledBorder.java:395)
	at javax.swing.border.CompoundBorder.getBorderInsets(CompoundBorder.java:124)
	at javax.swing.border.CompoundBorder.getBorderInsets(CompoundBorder.java:140)
	at javax.swing.JComponent.setBorder(JComponent.java:1749)
	at org.netbeans.modules.options.advanced.Model.getPanel(Model.java:75)
	at
org.netbeans.modules.options.advanced.AdvancedPanel.<init>(AdvancedPanel.java:75)
	at
org.netbeans.modules.options.advanced.AdvancedPanelController.getAdvancedPanel(AdvancedPanelController.java:76)
	at
org.netbeans.modules.options.advanced.AdvancedPanelController.update(AdvancedPanelController.java:32)
	at org.netbeans.modules.options.OptionsPanel.update(OptionsPanel.java:259)
	at
org.netbeans.modules.options.OptionsWindowAction.actionPerformed(OptionsWindowAction.java:110)
	at
org.netbeans.modules.applemenu.NbApplicationAdapter.performAction(NbApplicationAdapter.java:117)
	at
org.netbeans.modules.applemenu.NbApplicationAdapter.performAction(NbApplicationAdapter.java:103)
	at
org.netbeans.modules.applemenu.NbApplicationAdapter.handlePreferences(NbApplicationAdapter.java:87)
[catch] at com.apple.eawt.Application$5.run(Application.java:374)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)