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 :)

Similar Messages

  • ARD and VNC no longer connect to 2 out of 3 servers. Please help.

    We have 3 Mac OSX servers here - Web, DB, File. Recently, I attempted to connect via TightVNC - I only had a PC with me at the time. After setting the Mac servers to accept VNC connections (with a password), I was able to connect with TightVNC. ARD was still working fine as usual on the Mac.
    Last week, both the VNC and ARD connections started failing on the Web and File servers. The DB server works fine with both though. All of the remote and VNC settings on all 3 servers are the same, and like I said, everything was working fine. I also tried Chicken of the VNC from my Mac, but I get the same results (cannot connect).
    The ARD icons for the web and file servers are greyed out in ARD now. When I try to connect to them, I just get the message " Connection failed to (server name.)" The current status for both of these servers is "unknown." I can ping both of them though.
    Any ideas on why this would be working, then stop? Would a reboot fix this?
    What stumps me most is that the DB server connection is still working, even though all 3 of these servers are set up the same and were working without a problem.
    Thanks for any help!
    Message was edited by: jimvii
    Message was edited by: jimvii
    Message was edited by: jimvii
    Message was edited by: jimvii
    Message was edited by: jimvii

    I have found that reverse DNS entries, especially when they are wrong, can really mess things up. If you haven't already, in your ARD scanner windows, right-click and add the "DNS Name" column, and adjust the columns so you can see it. Whenever you have problems connecting in ARD, that's always a quick thing you can check. If the DNS name does not match your computer name, you'll have problems.
    I don't think you gave enough detail of what is and isn't working, but in general, you can try connecting both with dns names and IP addresses, and connecting to Macs sometimes works better by putting their name as macname.local instead of macname.yourdomain.com.
    If you try to connect with VNC via IP address, and the IP addresses on your servers are static (should be), and it doesn't work, it very likely could be a firewall setting. Even if you have the firewall off or ports open, you'll want to run a port scan against the server in question to test what truly is open.
    This is all general stuff. Post something more specific if none of this helps (detail of OS versions, programs used, ports set open, any error messages, etc).
    Good luck

  • Lion server on Mac mini server stop responding to ssh and VNC (other services like mail, ical works well)

    Lion server on Mac mini server stop responding to ssh and VNC (other services like mail, ical works well)
    Version is Lion server 10.7.4
    When I attach a monitor to it, I saw all the buttons and menus stopped responding too. I can only push and hold the power button on the box to shutdown.
    It only started happening recently.
    Anyone has any clue?
    Thanks for the help in advance!!!

    Found that the second hard drive is broken. I have to go to the apple store to have it replaced.
    I had to press the power button to turn the server off for several times, then the broken hard drive went disappeared. After that, I had to disable the Spotlight. Then the server went back to work normally.
    Now I made a CCC copy of the primary hard drive, and would like to have the server run on the external raid disk (connected through thunderbolt). Does anyone have previous experience with it? Any expectable drawback or issue with this setup?

  • 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

  • Slow SSH and VNC

    Hi!
    I'm visiting my family at the moment, and tried to call home to my desktop from my laptop that I brought with me. I've tried to use both VNC and SSH, and both are extremely slow. I'm sitting on a 24/2 mbps-line at the moment, while my desktop is connected to a 10/10 mbps-line. VNC is just too slow be usable, and sometimes it freezes for a long time. SSH also feels very sluggish, and when I tried to copy a file with sshfs I got a speed of around 20 Kb/s. At first I though there was something wrong with the connection, but then I started apache on my desktop and downloaded a file over http, and the speed was stable around 900 Kb/s as it should be. A traceroute shows that the trafic goes directly from my familys ISP to my ISP, and ping shows times around 20 ms. So I can't understand why SSH and VNC is so slow, and I don't even know where to begin troubleshooting. If anyone have any suggestions on what might be wrong I would be very grateful.
    Both of my computers run Arch64, and my desktop is connected via cable to a router while my laptop uses wireless (Intel 4965), also to a router. The routers are pretty much identical, both being Asus WL-500G Premium with DD-WRT firmware. The necessary ports are of course open, and I use port 2200 for SSH and 5900 for VNC.

    Could be one of the isps doing QoS on anything not http based traffic. Comcast sometimes _appears_ at least to be slowing down some of my non-http traffic for instance...
    Could be packet loss.
    Could be a busy neighborhood loop on a cable network (if that is what one end is..).
    Could be.. just about anything...
    Run iperf on both ends or something, and see what it says..
    Look at tcpdump output (or wireshark).
    poke around. try some stuff.
    *shrugs*

  • 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

Maybe you are looking for

  • Variable not found in repository - Done

    Hi, I have an ODI procedure for Oracle SP which needs an input param . Syntax begin Proc(sessionId); end; Generated a scenario out of this procedure. I want to use this scenario in some package. Steps: 1)Created a variable; dragged that as a first st

  • JDeveloper Prerelease 10.1.3 and toplink

    Hello, I know ADF is not supported but could someone tell me please if the new prerelease of JDeveloper supports toplink and if so how well is it supported? I mean by that does it have many quirks because it is a prelease. If anyone out there using i

  • Whenever i try to download an app.it shows installing then it shows write password then it doesnt download

    I am having a problem with my ipad 2,i recently updated my software to the latest..whenever i try to download an app.it shows installing then it shows write password after writing it doesnt download

  • I can not make a call on my magicjack

    i can not make a call on my magicjack on my iphone.there is a prompt telling visit my.magicjack.com/prepaid

  • PORBLEM WITH TUTORIAL PUB/SUB

    When I want complie my file, one of their can't be compile because I have this error: C:\JMS tutorial>javac SimpleTopicSubscriber.java SimpleTopicSubscriber.java:69: cannot find symbol symbol  : class TextListener location: class SimpleTopicSubscribe