I wrote in the subject the desktop is VISIBLE. Before setVisible(true)
the color settings work fine, i use the method ->
UIManager.put("Desktop.background", new Color(0, 100, 0));
But when the desktop is in use and i want to CHANGE the color nothing
works.
--
"No trees were destroyed in the sending of this message. However,
a large number of electrons were terribly inconvenienced."
> I wrote in the subject the desktop is VISIBLE. Before setVisible(true)
> the color settings work fine, i use the method ->
[quoted text clipped - 8 lines]
> "No trees were destroyed in the sending of this message. However,
> a large number of electrons were terribly inconvenienced."
Works fine for me!
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class test9 {
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JDesktopPane dp = new JDesktopPane();
dp.setLayout(new BorderLayout());
dp.setBackground(Color.YELLOW);
f.setContentPane(dp);
JButton b = new JButton("Change Color");
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ae) {
dp.setBackground(Color.BLUE);
}
});
dp.add(b,BorderLayout.SOUTH);
f.setSize(400,300);
f.setVisible(true);
}
});
}
}

Signature
Knute Johnson
email s/nospam/knute/
balla.peter@gmail.com - 12 Jan 2008 22:12 GMT
Yes this works. I use a package called
* JScroll - the scrollable desktop pane for Java.
* Copyright (C) 2003 Tom Tessier
This extends JDesktopPane and add some cool feature the best thing is -
> the desktop has a taskbar and show every JInternalFrame like windows
do.
But in the code there is nothing that deals with colors. After your
example i am sure this packega mess up something but i have no idea
what can go wrong.
--
"No trees were destroyed in the sending of this message. However,
a large number of electrons were terribly inconvenienced."
balla.peter@gmail.com - 12 Jan 2008 22:13 GMT
Yes this works. I use a package called
* JScroll - the scrollable desktop pane for Java.
* Copyright (C) 2003 Tom Tessier
This extends JDesktopPane and add some cool feature the best thing is -
> the desktop has a taskbar and show every JInternalFrame like windows
do.
But in the code there is nothing that deals with colors. After your
example i am sure this packega mess up something but i have no idea
what can go wrong.
--
"No trees were destroyed in the sending of this message. However,
a large number of electrons were terribly inconvenienced."
Knute Johnson - 12 Jan 2008 22:32 GMT
> Yes this works. I use a package called
>
[quoted text clipped - 13 lines]
> "No trees were destroyed in the sending of this message. However,
> a large number of electrons were terribly inconvenienced."
You wasted my time and Alexander's time by not giving us that little
detail up front. I don't like that!
JScroll appears not to have been updated in years. The website is dated
2003 and it says that the code has been tested against 1.3.1 and 1.4.1.
1.3 is obsolete and 1.4 will be obsolete this summer.
I do my best to avoid using any third party code for exactly this reason.

Signature
Knute Johnson
email s/nospam/knute/
balla.peter@gmail.com - 12 Jan 2008 22:47 GMT
Sorry about the time waste. In these case i thougth jscroll is
transparent, it simply extends JDesktopPane. I have no clue what can
go wrong. But anyway thank you for the help.
balla.peter@gmail.com - 12 Jan 2008 22:22 GMT
Yes this works. I use a package called
* JScroll - the scrollable desktop pane for Java.
* Copyright (C) 2003 Tom Tessier
This extends JDesktopPane and add some cool feature the best thing is -
> the desktop has a taskbar and show every JInternalFrame like windows
do.
But in the code there is nothing that deals with colors. After your
example i am sure this packega mess up something but i have no idea
what can go wrong.
--
"No trees were destroyed in the sending of this message. However,
a large number of electrons were terribly inconvenienced."