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