Hi Sergi,

You might be able to control this with X-Window settings.  For instance, under OpenBox, you can set some things like that by configuring some overrides in ~/.config/openbox/rc.xml:

http://openbox.org/wiki/Help:Applications#Example_of_per-app_settings

-MZ

On Mar 1, 2012, at 10:27 AM, Blaine Booher wrote:

This is likely a question better suited for the java (or gnome) guys.

Sincerely,
Blaine 



On Thu, Mar 1, 2012 at 10:21 AM, Sergi Torrellas <storrellas@bdigital.org> wrote:
Hi all,

I installed jikes (java compiler) and cacao (java runtime) in order to have java in my gumstix successfully.
I would like to have a swing application running in my gumstix with a swing frame. However, I cant have the window maximised on default. Here my code:

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.Toolkit;

public class HelloWorldSwing {
    /**
     * Create the GUI and show it.  For thread safety,
     * this method should be invoked from the
     * event-dispatching thread.
     */
    private static void createAndShowGUI() {
        //Create and set up the window.
        JFrame frame = new JFrame("HelloWorldSwing");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setSize( 200,100 );
    frame.setExtendedState( JFrame.MAXIMIZED_BOTH );

        //Add the ubiquitous "Hello World" label.
        JLabel label = new JLabel("Hello Worldddddddd");
    label.setSize(200,100);
        frame.getContentPane().add(label);

        //Display the window.
        frame.pack();
        frame.setVisible(true);

    // Get the size of the window
    Toolkit tk = Toolkit.getDefaultToolkit(); 
    int xSize = ((int) tk.getScreenSize().getWidth()); 
    int ySize = ((int) tk.getScreenSize().getHeight()); 
    System.out.println("Size of the window" + xSize + " " + ySize);

    }

    public static void main(String[] args) {
    System.out.println ( "-- Program Start --" );

        //Schedule a job for the event-dispatching thread:
        //creating and showing this application's GUI.
        javax.swing.SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                createAndShowGUI();
            }
        });
    System.out.println ( "-- Program End --" );

    }
}

and here the result of the execution:

root@overo:~/javaTests/swing# bash -x compileAndRun.sh
+ javac HelloWorldSwing.java
+ java HelloWorldSwing
-- Program Start --
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:46: Clearlooks configuration option "menuitemstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:47: Clearlooks configuration option "listviewitemstyle" is not supported and will be ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:48: Clearlooks configuration option "progressbarstyle" is not supported and will be ignored.
-- Program End --
Size of the window480 272

I have not many ideas about this. What about you?

Many thanks in advance,

Sergi

--
SERGI TORRELLAS SOCASTRO
eHealth AIL Coordinator
R+D Salut

M. 616.21.72.97

storrellas@bdigital.org
skype:sergi.torrellas




BARCELONA DIGITAL CENTRE TECNOL“GIC
R
oc Boronat 117, 5a planta, 08018 Barcelona 
Tel. +34 93 553 45 40 - Fax. +34 93 553 45 41 

www.bdigital.org



------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users

********************************************************

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. If you are not the addressee, any disclosure, reproduction,
copying, distribution, or other dissemination or use of this communication is
strictly prohibited. If you have received this transmission in
error please notify the sender immediately and then delete this e-mail.
E-mail transmission cannot be guaranteed to be secure or error free as
information could be intercepted, corrupted lost, destroyed, arrive late or
incomplete, or contain viruses.
The sender therefore does not accept liability for any errors or omissions
in the contents of this message which arise as a result of e-mail
transmission. If verification is required please request a hard copy
version.

********************************************************