You are not logged in.

Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Henning

Beginner

  • "Henning" is male
  • "Henning" started this thread

Posts: 9

Date of registration: Jan 15th 2009

Location: In Sweden, 50 km outside Östersund

Occupation: HW, FW & Interface developer

Hobbies: Cars, and ofcause my job ;)

  • Send private message

1

Saturday, January 17th 2009, 9:23pm

CommandButton Backcolor

Hi me again,

Setting the BackColor of a CommanButton in the Form Editor shows Color ok.
When Run the BackColor is light gray?? The ButtonFrame takes the BackColor.
?(
The Form's BackColor is ok.

/Henning

Manuel

Administrator

  • "Manuel" is male

Posts: 256

Date of registration: Jul 16th 2008

Location: Erlangen, Germany

Occupation: Software Developer

Hobbies: Jabaco, game theory, text-mining

  • Send private message

2

Sunday, January 18th 2009, 12:26am

You mean the default Windows XP / Vista Theme? You could change the Java/Jabaco Look and Feel. Or switch your default theme to "Windows Classic".

Henning

Beginner

  • "Henning" is male
  • "Henning" started this thread

Posts: 9

Date of registration: Jan 15th 2009

Location: In Sweden, 50 km outside Östersund

Occupation: HW, FW & Interface developer

Hobbies: Cars, and ofcause my job ;)

  • Send private message

3

Sunday, January 18th 2009, 1:46am

Jepp Thx,
The "Windows Classic" works, but it's IMO booring :thumbdown: . Where do I try and change 'Look and Feel'?

/Henning

Henning

Beginner

  • "Henning" is male
  • "Henning" started this thread

Posts: 9

Date of registration: Jan 15th 2009

Location: In Sweden, 50 km outside Östersund

Occupation: HW, FW & Interface developer

Hobbies: Cars, and ofcause my job ;)

  • Send private message

4

Monday, January 19th 2009, 12:40am

You mean the default Windows XP / Vista Theme? You could change the Java/Jabaco Look and Feel. Or switch your default theme to "Windows Classic".
I tried this with no success :(

In Module1:
Public SetJLAF As New JBCLookAndFeel

In Form1, with a CommandButton Cmd2:
Public bl As Boolean
Public Const WinXP As String = "Windows XP"
Public Const WinClassic As String = "Windows"

Public Function SJLAF() As Boolean
SJLAF = setJLAF.setJabacoLookAndFeel(WinXP)
End Function

Public Sub Cmd2_Click()
bl = SJLAF()
If bl Then
msgbox("Success")
Else
msgbox("Failed")
End If

End Sub

When click Cmd2 I get this in the lower right list
Exception in thread "AWT-EventQueue-1" java.lang.ClassNotFoundException: Windows XP
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
at VB.JBCLookAndFeel.setJabacoLookAndFeel(JBCLookAndFeel.jsrc:21)
at Form1.SJLAF(Form1.jsrc:71)
at Form1.Cmd2_Click(Form1.jsrc:75)
at Form1$CommandButton._Click(Form1.jsrc:82)
at VB.CommandButton.actionPerformed(CommandButton.jsrc:98)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at VBA.JabacoEventQueque.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


Where am I doing the wrong thing?

/Henning

Henning

Beginner

  • "Henning" is male
  • "Henning" started this thread

Posts: 9

Date of registration: Jan 15th 2009

Location: In Sweden, 50 km outside Östersund

Occupation: HW, FW & Interface developer

Hobbies: Cars, and ofcause my job ;)

  • Send private message

5

Monday, January 19th 2009, 12:54am


You mean the default Windows XP / Vista Theme? You could change the Java/Jabaco Look and Feel. Or switch your default theme to "Windows Classic".
I tried this with no success :(

In Module1:
Public SetJLAF As New JBCLookAndFeel

In Form1, with a CommandButton Cmd2:
Public bl As Boolean
Public Const WinXP As String = "Windows XP"
Public Const WinClassic As String = "Windows"

Public Function SJLAF() As Boolean
SJLAF = setJLAF.setJabacoLookAndFeel(WinXP)
End Function

Public Sub Cmd2_Click()
bl = SJLAF()
If bl Then
msgbox("Success")
Else
msgbox("Failed")
End If

End Sub

<snip>
Got it 8)

If I change to this:
Public Const WinXP As String = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"

It gives success, but no difference in CommandButton BackColor...or anything else ;(

/Henning

Rate this thread
WoltLab Burning Board