Swing and Skelmir VM

Hello Everyone,
I'm using a proprietary VM (from Skelmir) on a Linux/XScale board, and I'm having problems setting up the proper Swing classes my app needs to use.
Has anyone dealt with this issue yet ?
Any direction is appreciated.
Regards,
Andre

Not a reply, abit more info:-
After some more testing,
On my sytstem is gets to the point where all the menus/menuitems are displayable...
the menuitems will drop down........
Now the fun part......,
sometimes if I click an item enough times (or sometimes even the first time) they fire off to the listeners.
Other times they just don't respond.
So it is probably a simple internal JAVA problem but most likely an environmental one.
Anyone know a forum where this might get answered (meaining it is probably an external to JAVA thing and not that this forum isn't useful).
Thanks.

Similar Messages

  • Java Swing and Socket Programming

    I am making a Messenger like yahoo Messenger using Swing and Socket Programming ,Multithreading .
    Is this techology feasible or i should try something else.
    I want to display my messenger icon on task bar as it comes when i install and run Yahoo Messenger.
    Which class i should use.

    I don't really have an answer to what you are asking. But I am developing the same kind of application. I am using RMI for client-server and server-server (i have distributed servers) communication and TCP/IP for client-client. So may be we might be able to help each other out. My email id is [email protected]
    Are you opening a new socket for every conversation? I was wondering how to multithread a socket to reuse it for different connections, if it is possible at all.
    --Poonam.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Connect swing and J2EE

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing swing and j2ee
    Somebody knows something...
    I need your help....

    In WEB Application i used JSP, Struts and J2EE.
    But Now use swing application, and something for joing
    swing and j2ee
    hopefully, no business logic is in struts; only the application logic (i.e. order of screens, input type validation, etc.). If this is the case you have many options:
    - direct calls to the ejb (assuming you have a service defined as an EJB)
    - SOAP, SOAP-RPC, or a full web-service (as mentioned above)
    - your own custom protocol over HTTP
    - RMI (probably too much work; easier to just make direct EJB calls)
    - JMS (probably more work than just using SOAP or HTTP)
    - Socket based communication with your own custom protocol
    Probably the fastest to get going is direct calls from swing to the EJB.
    You'll have to re-implement your application logic; but this is fine as the swing app will probably have a different flow than the web-app.
    Best of luck,
    Andrew

  • Swings and Threads

    My applet communicates with the database. To ensure that the GUI is updated in the Event-Dispatching Thread I am using a SwingWorker: in construct() the application communicates with DB, and in finished() it updates the GUI. In construct() of the SwingWorker thread I need to create a dialog box to prompt the user for an input like to chose a color or to answer yes/no.
    My question is: Do I need to use invokeAndWait() to create the dialog box? The more general question is: do we use invokeLater() or SwingWorker only for GUIs that are shared by several threads or we have to use it for every swing we create after Event-Dispatching Thread started running?
    Thank you

    One of the fun things about Swing and its EventDispatchThread is that
    doing things wrong (such as performing Swing operations from a thread
    other than the EDT) is that more often than not, even though they are done
    technically wrong, they will still appear to work, especially in small programs.
    (In a larger sense, this applies to any multi-threaded program: things might
    appear to work until the timing changes just a teensy bit...)
    What's even more fun is working with someone who has previously only
    done small programs and because of that, takes this approach in large programs, and then spending a large amount of time trying to figure out why
    something sporadically stops working, only to trace it back to a Swing
    operation being invoked from a thread other than the EDT. Fun!
    You know how to do it correctly.
    You know why to do it correctly.
    But you choose not to. Good luck with that.

  • Using swing and swt together

    i would like to use some of the components of swt such labels or buttons in swing as swt has better look and feel. but in all the examples i found they are using a whole set of swt api to create frames and showing them up.
    Isnt there any way to add button or label of SWT in Swing. i found a method SWT_AWT.newFrame(). But it is returning a awt frame not a Swing JFrame that at the frame level. i need them at individual component level(buttons and labels).
    hope u understood my problem.. any other suggestions??

    Swing and SWT are two different framework. Usually, peoiple choose one and stick with it. I would not mess with mixing SWT with Swing or vice-versa. I really don't understand why you would choose to mix these two framework together. "better look and feel" is not the best answer for this. what i would look into is a look and feel for Java (like JGoodies look n feel)..and check for Swing component that pther people have made (or enhance upon the Swing library).
    Stick with one framework. Your life will be much easier.
    Futhermore, maintainance would be less difficult. (you only have to know one framework instead of two, plus how they interact)

  • Need  java code to perform refresh button action using swings and awt

    i need java code to perform refresh button action using swings and awt.please help me

    Wait ! Noboby ? OK, I'll do it
    public void onBtnAction ()
        if (!fresh)
            refresh ();
    }Seriously, did you expect anyone to answer such a cryptic question ?

  • Error swing and j2ee

    I have an application based on on j2ee. All the logica of the program this in J�E but the part client I am doing it in swing.
    I want to know if there is "something" with which I can unite the transference of information between the layer swing and j2ee.
    But of all ways I am making an example fast but I have an error and not like solving it.
    I am using Oracle9i, JDevelepoer 9.0.5 and the code is:
    Context context = new InitialContext();
    clienteBOHome = (ClienteBOHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/cliente"), ClienteBOHome.class);
    clienteBO = clienteBOHome.create();
    colClientes = (Vector)clienteBO.listarClientes();
    And the error is:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at com.tsawi.pm.gui.ListarClientes.jbInit(ListarClientes.java:58)
    at com.tsawi.pm.gui.ListarClientes.<init>(ListarClientes.java:44)

    Hi raguero,
    if you want to create and use a naming context, you need a JNDI service provider. A JNDI service provider is who provides a client 2 thinks:
    1) A Context Factory, which JNDI API uses tu build JNDI context
    2) A service listening on an host-port
    If you deploy your J2EE app under J2EE RI, you connect to JNDI service by this url:
    iiop://hostname:1050 (by default)
    and context factory to use is "com.sun.jndi.cosnaming.CNCtxFactory"
    so you got context like this:
    Properties prop=new Properties();
    prop.add(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.cosnaming.CNCtxFactory");
    prop.add(Context.PROVIDER_URL,"iiop://hostname:1050")
    Context jndiContext=new InitialContext(prop);
    Obvious, com.sun.jndi.cosnaming.CNCtxFactory class must be in client classpath.
    Fil

  • JFC/Swing and java Swing

    Are JFC Swing and java Swing both different?
    Thanks.

    Nope. Swing is Swing.
    http://java.sun.com/docs/books/tutorial/uiswing/14start/about.html

  • Swing and VNC

    hi,
    has anyone seen problems with Swing via VNC? i've seen components not being redrawn and am wondering if this is because Swings redraw routines are not triggering a VNC refresh because they are not done at the same level as native OS redraw.
    this sounds plausible but surely Windows knows at some level that a redraw has occured to refresh the screen content? I don't know anything about Windows API but would guess that there are events broadcast related to redraw which VNC is catching to efficiently communicate what has changed on screen?
    any help appreciated,
    thanks,
    asjf

    I have had a lot of problems with Swing and some of the other remote desktop like programs (PC Anywhere & Timbuktu to be specific). But I have always had good luck with VNC... I think they do something fundamentally different that works better. So to answer your question... no :)

  • Difference between AWT,Swing and swt

    Hello,
    I am giving a seminar about swing in which I need to point out differences between AWT,Swing and SWT(Software Widget Tool).
    I have two questions:
    1)I read that-A heavyweight component is one that is associated with its own native screen resource (commonly known as a peer). A lightweight component is one that "borrows" the screen resource of an ancestor-which makes it lighter.Can anybody explain What native screen resource is and how it is borrowed?
    2)I read that SWT uses native widgets and how can it be better than swing?If it is in what way?

    Use Swing for new projects. AWT is the rendering layer underneath Swing in many cases, and AWT provides utility things like Graphics. SWT is an alternative to Swing which used more native rendering, but actually with Java 6, Swing is using a lot of native rendering.
    Fire up NetBeans and use Matisse. Build an application. Run it under Windows, and then under Linux, and then realize how great it is.

  • Swing and Active rendering problem

    Hopefully this is the right place to post. I have a problem with active rendering and swing. Basically my code below messes up when I start rendering the swing either using repaint() or paint(g).
    If I use repaint() then the gui flickers like mad and if I use paint(g) then I get deadlocks when typing into the textbox.
    Any help would be great for what am I doing wrong. How do I solve this problem?
    public GuiWindow() {
              try {
                   guiImage = ImageIO.read(this.getClass().getResource("Images/Gui2.png"));
              } catch (Exception e) {}
              this.setPreferredSize(new Dimension(800, 600));
              this.setUndecorated(true);
              this.setIgnoreRepaint(true);
              this.setResizable(false);
              this.addKeyListener(kl);
              this.setFocusable(true);
              this.requestFocus();
              this.setTitle("PWO");
              JPanel panel = new JPanel()
              public void paintComponent(Graphics g)
              //Scale image to size of component
                   super.paintComponent(g);
                   Dimension d = getSize();
                   g.drawImage(guiImage, 0, 0, d.width, d.height, null);
                   this.setIgnoreRepaint(true);
                            //draw background for the gui
              JTextField Name = new JTextField(20);
              panel.add(Name);
              this.setContentPane(panel);
                    myRenderingLoop();
    public void myRenderingLoop() {
              int fps = 20;
              long startTime;
              int frameDelay = 1000 / fps;
              this.createBufferStrategy(2);
              BufferStrategy myStrategy = this.getBufferStrategy();
              Graphics2D g;
              while (!done) {
                   startTime = System.currentTimeMillis();          
                   do {
                        do {
                             g = (Graphics2D)myStrategy.getDrawGraphics();
                             this.repaint();
                             this.render(g); //render the game
                             g.dispose();
                        } while (myStrategy.contentsRestored());
                        myStrategy.show();
                        Toolkit.getDefaultToolkit().sync();
                   } while (myStrategy.contentsLost());
                   while (System.currentTimeMillis() - startTime < frameDelay) {
                        try {
                             Thread.sleep(15);
                        } catch (InterruptedException ex){}
         }Edited by: Aammbi on Apr 6, 2008 7:05 PM

    I really have no idea what your code is trying to do, but a few comments.
    1) There is no need to use a BufferStrategy since Swing is double buffered automatically
    2) Don't use a while loop with a Thread.sleep(). Chances are the GUI EDT is sleeping which makes the GUI unresponsive
    3) Use a Swing Timer for animation.
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.

  • Stringtokenizer, swing and memory

    i lately found that the stringtokenizer eats up lots of memory, i tried to set vars to null and called sys gc quite often but they didnt seem to be of much help.
    ok, here is what i was doing: i read in a quite a big txt file, about 400k lines, and then parsed each line using stringtokenizer, everything happened in while loops, lots of objects but all small ones. i had to xmx lots of memories to it in order to run it. and it became much worse when i put it into multi threaded swing app. if you are a swing expert, or stringtokenizer expert, please shed some light.

    Dang it! Sun zapped a bunch of posts!
    Anyway, here again is a sample pgm posted earlier (which got zapped) showing some of the benefits of the finally block, for which the idiot daFei could not come up with an intelligent answer to refute it (he STILL has a beef with the finally block, claiming it is only "syntactic sugar", and still moronically implies that all methods must handle all exceptions, which is absurd in that no exceptions could ever be THROWN then!)
    import java.io.File;
    import java.io.IOException;
    class SillyQuestionException extends Exception {
      public SillyQuestionException() {
        super("That's a silly question.  Of course!");
    class Guru {
       * Responds to a question/statement.  A temporary file is created
       * during execution, and deleted upon return (unless daFei dorks
       * with the implementation!)
       * @param request the question/statement for Guru to respond to
       * @return the Guru's response
       * @throws SillyQuestionException if the Guru determines you're
       * asking a silly question,
       * to which the answer should be obviously YES
      public static String respond(String request)
        throws SillyQuestionException {
        File f = new File("daFei.is.an.idiot");
        try {
          System.out.println("  Guru is thinking...");
          f.createNewFile();
          // let's just assume we needed to write stuff to this file in
          // order to process the request...
          // now the actual end of processing
          if ("is daFei an idiot".equals(request))
            throw new SillyQuestionException();
        catch (IOException e) {
          System.out.println("Error occurred creating/writing to " +
            "temp file, but graceful recovery is possible");
          e.printStackTrace();
          return "I'll have to get back to you on that one.  " +
            "Ask me again later.";
        finally {
          // this is NECESSARY to GUARANTEE deletion of the temp file,
          // otherwise this statement would have to be duplicated at all
          // possible return points.
          System.out.println("  Guru has processed your request...");
          if (f != null)
            f.delete();
        System.out.println("  will this get printed EVERY time?  " +
          "NO IT WILL NOT!");
        return "daFei has fish turds in his brain";
    public class Demo {
      public static void main(String[] args) {
        String[] questions = {
          "what statement best describes daFei",
          "what kind of turds does daFei have in his brain",
          "is daFei an idiot",
          "won't get to this question"
        try {
          for (int i = 0; i < questions.length; ++i) {
            System.out.println("Question: " + questions);
    System.out.println("Response: " + Guru.respond(questions[i]));
    catch (SillyQuestionException e) {
    System.out.println("I have finally asked the Guru a silly " +
    "question, and will stop now");
    System.out.println("Here's what Guru had to say to the last " +
    "question: " + e);

  • Swing and jmf

    can u please have a look to the attached file
    i know that this involves the jmf API but I have the feeling that has to do more with swing, thats whay I post my question here
    this simple application is based on the MDI.java example of the jmf web
    pages
    I also added a slider and want to set the playback rate for the player from
    there if possible
    that is I want everytime that I move the slider and the value is biggerthan
    50 the rate to be reduced according to a simple calculation that converts
    the slider value to a value between 0 an1 for the rate...
    so all i want to do is pass the slider value to the player everytime that
    the slider changes value and this is bigger than 50
    the attached file can do that only when the player starts playing the
    file,,,,
    after the player has started and the rate is set I cant change it even if
    the slider moves
    when I tried to do that from within the stateChanged method of the slider I
    was getting a Nullpointer exception because of the EventDispatching thread,
    so I thought to take this piece of code out of there (create the setnewrate
    method in the jmframe instead),,,,but then of course doesnt work like I
    would want,,,,,
    do I have to register the class that implements the frame for the player as
    a ChangeListener on the slider to achieve that, is something like that
    possible....
    I know that swing is not supposed to be thread safe, so maybe this is what
    the problem is after all...any suggestions to that direction?
    Can u please have a look??
    I am a beginner so any help would really be very much appreciated
    thanx :)
    maria
    .....and the attached file
    I think the problem is with the stateChanged method for the Jslider...
    I am getting a null pointerexception because of the eventdispatching thread
    pls ignore any silly mistakes I am a completely newbie in java
    myAppfr2.java
    import javax.media.*;
    import com.sun.media.ui.*;
    import javax.media.protocol.*;
    import javax.media.protocol.DataSource;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
    import java.util.Vector;
    import javax.swing.border.Border.*;
    import java.util.Hashtable;
    public class myAppfr2 extends Frame {
    * VARIABLES
    JMFrame jmframe = null;
    JDesktopPane desktop;
    FileDialog fd = null;
    CheckboxMenuItem cbAutoLoop = null;
    Player player ;
    //Player newPlayer = null;
    String filename;
    boolean stopped;
    public my_slider test_slider;//put it here so I can use it by name by all code
    float rate;
    * MAIN PROGRAM / STATIC METHODS
    public static void main(String args[]) {
    //if (args.length > 0)
         //rate=Float.parseFloat(args[0]);
    myAppfr2 mdi = new myAppfr2();
    static void Fatal(String s) {
    MessageBox mb = new MessageBox("JMF Error", s);
    * METHODS
    public myAppfr2() {
    super("VHE Demo");
    // Add the desktop pane
    setLayout( new BorderLayout() );
    desktop = new JDesktopPane();
    desktop.setDoubleBuffered(true);
         desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);//makes dragging faster
    add("Center", desktop);
    setMenuBar(createMenuBar());
    setSize(640, 480);
    setVisible(true);
         test_slider = new my_slider("networkutil");
         createnetworkutil();
         try {
         UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel") ;
    } catch (Exception e) {
    System.err.println("Could not initialize personal look and feel");
    addWindowListener( new WindowAdapter() {
    public void windowClosing(WindowEvent we) {
    System.exit(0);
    Manager.setHint(Manager.LIGHTWEIGHT_RENDERER, new Boolean(true));
    private MenuBar createMenuBar() {
    ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
    String command = ae.getActionCommand();
    if (command.equals("Open")) {
    if (fd == null) {
    fd = new FileDialog(myAppfr2.this, "Open File",
    FileDialog.LOAD);
    fd.setDirectory("~/movies");
    fd.show();
    if (fd.getFile() != null) {
    String filename = fd.getDirectory() + fd.getFile();
    openFile("file:" + filename);
    } else if (command.equals("Exit")) {
    dispose();
    System.exit(0);
    MenuItem item;
    MenuBar mb = new MenuBar();
    // File Menu
    Menu mnFile = new Menu("File");
    mnFile.add(item = new MenuItem("Open"));
    item.addActionListener(al);
    mnFile.add(item = new MenuItem("Exit"));
    item.addActionListener(al);
    // Options Menu
    Menu mnOptions = new Menu("Options");
    cbAutoLoop = new CheckboxMenuItem("Auto replay");
    cbAutoLoop.setState(true);
    mnOptions.add(cbAutoLoop);
    mb.add(mnFile);
    mb.add(mnOptions);
    return mb;
    //create slider and add it to desktop
    public void createnetworkutil(){
    test_slider.pack();
    desktop.add(test_slider);
    test_slider.setVisible(true);
    * Open a media file.
    private void openFile(String filename) {
    String mediaFile = filename;
    Player player = null;
    // URL for our media file
    URL url = null;
    try {
    // Create an url from the file name and the url to the
    // document containing this applet.
    if ((url = new URL(mediaFile)) == null) {
    Fatal("Can't build URL for " + mediaFile);
    return;
    // Create an instance of a player for this media
    try {
    player = Manager.createPlayer(url);
    } catch (NoPlayerException e) {
    Fatal("Error: " + e);
    } catch (MalformedURLException e) {
    Fatal("Error:" + e);
    } catch (IOException e) {
    Fatal("Error:" + e);
    if (player != null) {
    this.filename = filename;
    JMFrame jmframe = new JMFrame(player, filename);
    desktop.add(jmframe);
    class JMFrame extends JInternalFrame implements ControllerListener {
    public Player mplayer;
    Component visual = null;
    Component control = null;
    int videoWidth = 0;
    int videoHeight = 0;
    int controlHeight = 30;
    int insetWidth = 10;
    int insetHeight = 30;
    // boolean firstTime = true;
    public JMFrame(Player player, String title) {
    super(title, true, true, true, true);
    getContentPane().setLayout( new BorderLayout() );
    //setSize(320, 10);
    setLocation(200, 25);
    setVisible(true);
    mplayer = player;
    mplayer.addControllerListener((ControllerListener) this);
    mplayer.realize();
    addInternalFrameListener( new InternalFrameAdapter() {
    public void internalFrameClosing(InternalFrameEvent ife) {
    mplayer.close();
    public void controllerUpdate(ControllerEvent ce) {
    // System.out.println("controllerUpdate");
    //SwingUtilities.isEventDispatchThread();
    if (ce instanceof RealizeCompleteEvent) {
    mplayer.prefetch();
    } else if (ce instanceof PrefetchCompleteEvent) {
    if (visual != null)
    return;
         //setnewrate();
         //rate=mplayer.getRate();
         System.out.println( mplayer.getRate());
    if ((visual = mplayer.getVisualComponent()) != null) {
    Dimension size = visual.getPreferredSize();
    videoWidth = size.width;
    videoHeight = size.height;
    getContentPane().add("Center", visual);
    } else
    videoWidth = 320;
    /*if ((control = mplayer.getControlPanelComponent()) != null) {
    controlHeight = control.getPreferredSize().height;
    getContentPane().add("South", control);
    setSize(videoWidth + insetWidth,
    videoHeight + controlHeight + insetHeight);
    validate();
    mplayer.start();
    } else if (ce instanceof StartEvent){
         if (test_slider.netutil==0) {
         mplayer.stop();
         } else if (ce instanceof EndOfMediaEvent && cbAutoLoop.getState()) {
    mplayer.setMediaTime(new Time(0));
              boolean stopped=true;
              mplayer.prefetch();
              mplayer.start();
              stopped=false;
    class my_slider extends JInternalFrame implements ChangeListener{
    //Set up parameters.
    int netini=50;
    public int netutil=netini;
    public my_slider(String windowTitle) {
    super(windowTitle, false, false, false, false);
    getContentPane().setLayout(new BorderLayout());
    setLocation(25,25);// for the internal frame that contains the slider
    setVisible(true); //..same
    //Create the slider(the component included in "my_slider" internal frame
         JSlider mslider = new JSlider(JSlider.VERTICAL,
    0, 100, netini);
    mslider.addChangeListener((ChangeListener) this);
    mslider.setMajorTickSpacing(10);
    mslider.setPaintTicks(true);
    //Create the label table.
    Hashtable labelTable = new Hashtable();
    labelTable.put(new Integer( 0 ),
    new JLabel("0%") );
    labelTable.put(new Integer( 25 ),
    new JLabel("25%") );
    labelTable.put(new Integer( 50 ),
    new JLabel("50%") );
    labelTable.put(new Integer(75),
    new JLabel("75%") );
         labelTable.put(new Integer( 100),
    new JLabel("100%") );     
    mslider.setLabelTable(labelTable);
    mslider.setPaintLabels(true);
    mslider.setBorder(
    BorderFactory.createEmptyBorder(0,0,0,10));
         //Put everything in the content pane.
    getContentPane().add(mslider, BorderLayout.CENTER);
    public void stateChanged(ChangeEvent e) { //System.out.println("stateChanged");
    // SwingUtilities.isEventDispatchThread();
    if (e instanceof ChangeEvent){
    JSlider source = (JSlider)e.getSource();
    if (!source.getValueIsAdjusting()) {
    netutil= (int)source.getValue();
         System.out.println(netutil);
              if (jmframe.mplayer!=null) {
         jmframe.mplayer.setRate((float)(netutil/(netutil+(0.3*netutil))));
              if (jmframe.mplayer.getTargetState() <Player.Started)
         jmframe.mplayer.prefetch();
    i am stuck so any help would be really very much appreciated

    did you ever resolve this.
    I may be having similar problems
    I have an JMF application running under webstart. It runs ok in Java 1.3
    Now I am trying to get ti to run under Java 1.4. The attached error is rather useless,
    but by guess at what is happening is that the JMF control has some .awt. stuff included
    but that Java 1.4 emulates .awt. in swing. But something was not set and the default does not
    work.
    This error messages does not appear in the 1.3 run
    Any suggestions would be greatly appriatated.
    1.4 result:
    mg version 2.1.1a
    player created com.sun.media.content.unknown.Handler@3a1834
    ctr com.sun.media.PlaybackEngine$BitRateA@4a9a7d
    ctr com.sun.media.BasicJMD[panel0,0,0,512x200,invalid,layout=java.awt.BorderLayout]
    duration? javax.media.Time@6b5666 sec = 9.223372036854776E9
    time unknown javax.media.Time@754699
    will realize the player
    realize
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.
    Handler@3a1834,previous=Unrealized,current=Realizing,
    target=Realized]
    start smxBADS
    bass start
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    realize done
    panel found java.awt.Panel[panel1,0,0,0x0,invalid] java.awt.Panel[panel2,4,216,292x30,layout=java.awt.FlowLayout]
    press a button
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalLookAndFeel.getControlInfo(Unknown Source)
    at javax.swing.plaf.metal.MetalScrollButton.paint(Unknown Source)
    at javax.swing.JComponent.paintChildren(Unknown Source)
    at javax.swing.JComponent.paint(Unknown Source)
    at javax.swing.JComponent.paintWithBuffer(Unknown Source)
    at javax.swing.JComponent._paintImmediately(Unknown Source)
    at javax.swing.JComponent.paintImmediately(Unknown Source)
    at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    Exception occurred during event dispatching:
    java.lang.NullPointerException
    1.3 result
    mg version 2.1.1a
    player created com.sun.media.content.unknown.Handler@354749
    ctr com.sun.media.PlaybackEngine$BitRateA@5b484d
    ctr com.sun.media.BasicJMD[panel3,0,0,512x200,invalid,layout=java.awt.BorderLayout]
    duration? javax.media.Time@46d228 sec = 9.223372036854776E9
    time unknown javax.media.Time@f7386
    will realize the player
    realize
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.
    Handler@354749,previous=Unrealized,current=Realizing,
    target=Realized]
    start smxBADS
    bass start
    javax.media.DurationUpdateEvent[source=com.sun.media.content.unknown.Handler@354749,duration=javax.media.Time@55c0f9
    javax.media.Time@55c0f9
    javax.media.RealizeCompleteEvent[source=com.sun.media.content.unknown.Handler@354749,previous=Realizing,current=Realized,target=Realized]
    realized complete
    prefetch
    realize done
    controlComp com.sun.media.ui.DefaultControlPanel[,0,0,74x21,invalid,layout=java.awt.BorderLayout]
    add controlComp 21 java.awt.Panel[panel4,10,-12,258x47,invalid]
    javax.media.TransitionEvent[source=com.sun.media.content.unknown.Handler@354749,previous=Realized,current=Prefetching,target=Prefetched]
    start smxBADS
    bass start
    running ok from here on

  • Swing and AWTEventListener

    Hi
    I am trying to catch all ActionEvents generated in a program using an AWTEventListener following the example in http://developer.java.sun.com/developer/qow/archive/19/index.html.
    I have modified the code so it looks like this
    //EventTest.java
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class EventTest extends JFrame {
        public EventTest() {
            JButton jb1=new JButton("hello");
            getContentPane().add(jb1);
    //      AWTEventListener
            getToolkit().addAWTEventListener(
             new AWTEventListener() {
                 public void eventDispatched(AWTEvent e) {
                  System.out.println(e+"\n");
             AWTEvent.FOCUS_EVENT_MASK |
                   AWTEvent.ACTION_EVENT_MASK
        public static void main(String args[]){
         EventTest et=new EventTest();
         et.setSize(300,300);
         et.pack();
         et.show();
    }The problems is that when I use a swing button(JButton) I dont get any ActionEvents but if I use an awt button it works fine!
    Why is this? What is the differnes between an awt button and JButton? They both generates the same ActionEvent.
    I have also tried making my own EventQueue but it only recieves low levet events like mouseEvents and keyEvents.
    Any Help is very much appriciated
    Thanks
    Peter

    why you dont try this:
    jb1.getToolkit().addAWTEventListener(
         new AWTEventListener() {
              public void eventDispatched(AWTEvent e) {
                   System.out.println(e.getSource().getClass().getName(
    +"\n");
         AWTEvent.ACTION_EVENT_MASK     );It wont help since the eventDispatched method is never called when you press a JButton only when you press a awt Button.
    Thanks for the reply
    Peter

  • ADF Swing and EL

    Hello,
    I am creating a swing view for my ADF application (quite new for me, swing...) and I'd like to know how I can use localization for items such as frame title, menu item names, etc.
    I'm using JDeveloper 11.1.1.3.0

    Hi,
    you use Java resource bundles and reference the keys in there. In this regard, ADF Swing is not different from any Java Swing example you find using Google
    Frank

Maybe you are looking for

  • My music won't transfer on my brand new nokia c6-0...

    Hi everybody, I bought my phone in the last couple of days.Everything work perfectly on the phone . I tried to transfer some photos and it works. I tried to transfer some music in playlist and it says in french (because I'm from Canada Qubec city) :

  • Can't Update CS4 on New Laptop Running Windows 7 64bit

    I just upgraded a 2 year old slow laptop running 32 bit Vista to a brand new Asus G73JW laptop running Windows 7 64 bit. It is a really fast laptop with 8G RAM, 1.5GB dedicated graphics card, full 1920 x 1080 HD res, solid state drive for operating d

  • Can't Transfer Songs to iPod

    Whenever I plug in my iPod, all my USB devices stop working. Anyone know a solution?

  • Duplicate my invoice please

    Hello need of duplicate invoice of purchase I made the order number: (removed per forum guidelines) My mail : (removed per forum guidelines) Thanks Luciano  (removed per forum guidelines)

  • Why are lyrics not viewable in itunes in the same way as on the ipod?

    Why are lyrics not viewable in itunes in the same way as on the ipod? In itunes all you get is "Get Info" then "Lyrics" and that screen then locks itunes until you close it. Inflexible, annoying and surely unnecessary?