Re: Problem in displaying swing components on ARM, using GNU Classpath and Cacao

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




>> To make the swing components visible, Does I have to keep any specific
>> libraries on path or I have to set any environment variables or
>> provide runtime parameters ?
>>
>> Thanks in Adavance.


>Hi!
>
>Are you trying to display a swing widget on top of an awt one?
>What swing peer are you running?
>Does your program works correctly with the same version of GNU Classpath
>on a x86 Linux machine?
>
>Cheers,
>
>Mario

   Hi Mario,
   Thanks for the reply. In both cases swing widget on swing(JFrame) or swing on awt - swing widjets like (labels, textfields, buttons,..) are not visible, but window is visible.
I build the gnuclasspath using default options, so the awt-peer is Gtk.
The program is working fine under x86 Linux machine with the same version of GNU Classpath.
The simple swing program I am using is:

 import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Font;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class SimpleLabel {
  public static void main(String[] args) {
    JFrame frame = new JFrame("SImpleLabel");
    frame.setTitle("JLabel Test");
    frame.setLayout(new FlowLayout());
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JLabel label = new JLabel("First Name");
    label.setFont(new Font("Courier New", Font.ITALIC, 20));
    label.setForeground(Color.RED);
        System.out.println("label name:"+label.getText());
        System.out.println("UI:"+label.getUI());
        System.out.println("Toolkit:"+label.getToolkit());
    frame.add(label);
    frame.setSize(500,500);
    frame.setVisible(true);
  }
}

Output:
label name:First Name

UI:javax.swing.plaf.metal.MetalLabelUI@24fa68
Toolkit:gnu.java.awt.peer.gtk.GtkToolkit@6acc0


Thanks & Regards
MVN Pavankumar



[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux