Applet re-sizing problem

Hi!
I don't want to handle componentResize for a panel in my Applet until the user is finished resizing the browser, i.e. when the mouse has been released. Is there any way to do this?
Very greatful for any hints!
Magnus

I resized in FCP because I need to crop the image. If I had kept the sequence settings at 720x576 then I would have increased the size of the picture by around 10% to get rid of the stuff around the edge of the picture that should never have been recorded. I know that doing that will result in a degraded image because I'm blowing it up beyond it's native resolution. But because I'm going to half the size of the thing for internet delivery later on anyway, I tried to blow it up and stay within it's natve resolution by decreasing the size settings of the sequence, then resized the picture making sure that I was actually decreasing rather than increasing it's size. So the image is decreased in size by 85% but the sequence is decreased in size by 75%, leaving me room to crop off the edges. It looks fine until I render it.. which is weird no?

Similar Messages

  • Q10 Screen Sizing Problem in Blackberry 10.3

    Has anyone else noticed that there seems to be a screen sizing problem in Blackberry 10.3.
    When you wake the screeen with a gesture or pull the handset from the Q10 pocket, the screen that it "wakes" up to is enlarged, requiring the user to use the finger gestures to shrink it down to regular size.
    Or have I just not mastered 10.3 yet?
    Rgds
    E.T.
    Solved!
    Go to Solution.

    Hi Folks,
    I've sussed this one out!
    It is not a problem with the screen resolution or the software update, I had within the accessibility settings the "Magnify Mode" enabled.
    Disable this and the screen behaves perfectly..........
    False Alarm. Sorry!
    Revert to Defcon 5...........   :-)

  • I have a basic applet method timing problem with Firefox (and Chrome), not IE nor Opera. Works if JavaScript issues windows.alert() prior, fails otherwise.

    I have an applet method, which is invoked from a JavaScript function, that is triggered by the window.onload event. The problem seems to center in the loading of the applet and its methods.
    If I step through the 3 applet acceptance prompts (I chose to use a down-level Java), the applet method is never invoked, nor is an exception raised. How this happens is beyond my understanding.
    As additional information, the Init(), start(), and "desired" Java methods all use the synchronized keyword. This is an attempt to minimize the exposure to a multi-thread environment.
    If I issue a message from JavaScript (via window.alert()) PRIOR to invoking the method, I can get the desired results in special circumstances:
    1) When the alert is presented, Firefox also prompts, SIMULTANEOUSLY, to block/continue the applet (the first of the 3 applet acceptance prompts). I can accept that these are separate threads.
    2a) If I walk through the 3 applet acceptance prompts FIRST, and then hit the OK button on the alert message SECOND, I get the desired results, my applet method executes, and all is well (other than the fact that I would prefer not to have the alert in place at all).
    2b) If I hit the OK button on the alert message FIRST, and then walk through the 3 applet acceptance prompts SECOND, I get the same results as when the page loads WITHOUT the alert, which is the applet method is never invoked, nor is an exception raised. Weird, huh?
    The above problem only occurs when the browser and the applet's URL are loaded for the first time.
    Subsequent invocations (after the page & applet has been loaded initially) do not have the failing symptoms.
    It is my understanding that IE and Firefox (and Chrome and Opera, for that matter) each use the same implementation of JavaScript provided by Microsoft. Please correct me if this information is inaccurate.
    The failing page and it's applet are proprietary; I cannot provide the Internet URL, nor the Java or JavaScript source, to aid in your analysis.

    I can speak to the source code, but have no access to it.
    The current process/thread that invokes an applet method must check to see that the applet is not currently being loaded by another process/thread. If it is being loaded, the current process/thread should block until the load is complete, THEN attempt to invoke the applet method.
    Please forward my concern to a knowledgable developer. The nature of the problem, once identified, can be addressed in a very straightforward manner.

  • Multiple instances of the same applet loaded causes problem

    I have a java applet that has several classes in the project. The applet has a JTable a JButton and a JLabel control. The applet is displayed within an HTML page. The problem is that if a user opens the same html page more than once with the applet in it, only the last applet loaded receives the screen updates.
    For example in one senario. I have an error message that displays in the Label control once they click on the button.
    The user opens the html page and the applet is loaded (window 1). The user then opens the same html page again (window 2) with window 1 still open. If the user clicks on the Button in window 1, the error message is displayed in the window 2 applet.
    Originally I had some static variables. Thinking it was being used globally by the JVM so I removed all of them and it still happens. I have tried using both the Applet and Object tag. But it still happens.
    Has anyone experienced this before? Any suggestions on how to make the applet update the instance that recieved the events and not just the last one that was loaded?

    You need to look at applet classloader issues. If applets have the same archive list and come from the same codebase, they have the same classloader. A class is namespaced by it's class + classloader. Any statics in a class with a classloader will be shared. If you instead make it such that your applets have unique classloaders (which you can't change for unsigned applets by yourself) by changing the codebase, that would be one solution.
    For other solutions, I recommend searching the forum. This issue comes up a lot.

  • Load a second video into an applet: resize - stretch problem

    Hello!
    I have an applet that loads a movie (call it film_a.mov). The size of the movie is 320 x 240. Since I want to show it bigger, I use a BorderLayout that stretches the video depending on the size given by
    the applet. In my case I set the applet parameter to "<applet code=Simple.class width=640 height=510>". Anyway, this display area is bigger than the actuell video size, so the video will be stretched.
    Everytime a user clicks with the mouse pointer onto the video area the second movie (call it film_b.mov) replace the first movie. The setup for the BorderLayout has not be chance. I close the player before loading the second movie with a function called loadNewMovie(). I even call this.removeAll(), player.close() and player.removeControllerListener(this).
    The problem is that if the second movie is loaded and placed into the vido display area it is not alway stretched to the possible BorderLayout.CENTER area. Sometimes it is stretched sometimes it is not streched. I really do not understand such behavior. It seems to me that I forget to call a update function that tells to stretch alway any video displayed.
    Both movies have the same size. I tried to solve this problem by using setSize, setBounds, etc. on the visualComponent but this does not solve the problem. If you want to try out, here come the code:
    mport java.applet.Applet;
    import java.awt.*;
    import java.lang.String;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.io.IOException;
    import javax.media.*;
    // import com.sun.media.util.JMFSecurity;
    * This is a Java Applet that demonstrates how to create a simple media player
    * with a media event listener. It will play the media clip right away and
    * continuously loop.
    * <applet code=Simple.class width=640 height=510> <param
    * name=file1 value="auto.mov"> <param name=file2 value="hongkong.mov">
    public class Simple extends Applet implements ControllerListener {
         private static final long serialVersionUID = 1L;
         // media Player
         Player player = null;
         // component in which video is playing
         Component visualComponent = null;
         // controls gain, position, start, stop
         Component controlComponent = null;
         // displays progress during download
         Component progressBar = null;
         boolean firstTime = true;
         long CachingSize = 0L;
         int controlPanelHeight = 0;
         int videoWidth = 0;
         int videoHeight = 0;
         MediaLocator mrl = null;
         String mediaFile1 = null;
         String mediaFile2 = null;
         boolean closed = false;
          * Read the applet file parameter and create the media player.
         public void init() {
              // $ System.out.println("Applet.init() is called");
              setLayout(new BorderLayout());
              setBackground(Color.red);
              if ((mediaFile1 = getParameter("FILE1")) == null)
                   Fatal("Invalid media file parameter");
              if ((mediaFile2 = getParameter("FILE2")) == null)
                   Fatal("Invalid media file parameter");
          * Start media file playback. This function is called the first time that
          * the Applet runs and every time the user re-enters the page.
         public void start() {
              // $ System.out.println("Applet.start() is called");
              // Call start() to prefetch and start the player.
              getMedia(mediaFile1);
              if (player != null)
                   player.start();
              setVisible(true);
          * Stop media file playback and release resource before leaving the page.
         public void stop() {
              // $ System.out.println("Applet.stop() is called");
              if (player != null) {
                   player.stop();
                   player.deallocate();
         public void destroy() {
              // $ System.out.println("Applet.destroy() is called");
              player.close();
         public void getMedia(String mediaFile) {
              URL url = null;
              try {
                   url = new URL(getDocumentBase(), mediaFile);
                   mediaFile = url.toExternalForm();
              } catch (MalformedURLException mue) {
              try {
                   // Create a media locator from the file name
                   if ((mrl = new MediaLocator(mediaFile)) == null)
                        Fatal("Can't build URL for " + mediaFile);
                   // Create an instance of a player for this media
                   try {
                        player = Manager.createPlayer(mrl);
                   } catch (NoPlayerException e) {
                        System.out.println(e);
                        Fatal("Could not create player for " + mrl);
                   // Add ourselves as a listener for a player's events
                   player.addControllerListener(this);
              } catch (MalformedURLException e) {
                   Fatal("Invalid media file URL!");
              } catch (IOException e) {
                   Fatal("IO exception creating player for " + mrl);
          * This controllerUpdate function must be defined in order to implement a
          * ControllerListener interface. This function will be called whenever there
          * is a media event
         public synchronized void controllerUpdate(ControllerEvent event) {
              // If we're getting messages from a dead player,
              // just leave
              if (player == null)
                   return;
              // When the player is Realized, get the visual
              // and control components and add them to the Applet
              if (event instanceof RealizeCompleteEvent) {
                   if (progressBar != null) {
                        remove(progressBar);
                        progressBar = null;
                   if ((controlComponent = player.getControlPanelComponent()) != null) {
                        controlPanelHeight = controlComponent.getPreferredSize().height;
                        add(BorderLayout.SOUTH, controlComponent);
                        validate();
                   if ((visualComponent = player.getVisualComponent()) != null) {
                        add(BorderLayout.CENTER, visualComponent);
                        validate();
                        visualComponent
                                  .addMouseListener(new java.awt.event.MouseAdapter() {
                                       public void mousePressed(
                                                 java.awt.event.MouseEvent evt) {
                                            System.out
                                                      .println("MovieStreaming: mousePressed");
                                            loadNewMovie(mediaFile2);
                                       public void mouseReleased(
                                                 java.awt.event.MouseEvent evt) {
                                       public void mouseEntered(
                                                 java.awt.event.MouseEvent evt) {
                                       public void mouseExited(
                                                 java.awt.event.MouseEvent evt) {
              } else if (event instanceof CachingControlEvent) {
                   if (player.getState() > Controller.Realizing)
                        return;
                   // Put a progress bar up when downloading starts,
                   // take it down when downloading ends.
                   CachingControlEvent e = (CachingControlEvent) event;
                   CachingControl cc = e.getCachingControl();
                   // Add the bar if not already there ...
                   if (progressBar == null) {
                        if ((progressBar = cc.getControlComponent()) != null) {
                             add(progressBar);
                             setSize(progressBar.getPreferredSize());
                             validate();
              } else if (event instanceof EndOfMediaEvent) {
                   // We've reached the end of the media; rewind and
                   // start over
                   player.setMediaTime(new Time(0));
                   player.start();
              } else if (event instanceof ControllerErrorEvent) {
                   // Tell TypicalPlayerApplet.start() to call it a day
                   player = null;
                   Fatal(((ControllerErrorEvent) event).getMessage());
              } else if (event instanceof ControllerClosedEvent) {
                   closed = true;
         public void closePlayer() {
              synchronized (this) {
                   player.close();
                   while (!closed) {
                        try {
                             wait(100);
                        } catch (InterruptedException ie) {
                   player.removeControllerListener(this);
                   System.out.println("player is shutdown");
                   closed = false;
         public void loadNewMovie(String mediaFile) {
              // remove all components
              closePlayer();
              removeAll();
              getMedia(mediaFile);
              if (player != null)
                   player.start();
              setVisible(true);
         void Fatal(String s) {
              // Applications will make various choices about what
              // to do here. We print a message
              System.err.println("FATAL ERROR: " + s);
              throw new Error(s); // Invoke the uncaught exception
              // handler System.exit() is another
              // choice.
    }As you may notice this code is basicly the SimplePlayerApplet example which I modified a bit.
    Thank you for your Help
    Matt2

    Sorry,
    Can you tell me how do you solve it because I have got the same problem.
    Can you indicate me the topic where did you find solution.
    Thank in advance.

  • Java Applet Background Color Problem on Internet Explorer

    Hi,
    Please check out the following URL:
    http://www.utopiainteractive.com/clients/AkonFinal/glossary.htm
    The menu bar is writting in Java Applet. If you scroll down the page, and scroll back up, I see white background as I scroll back up. It happens only on Internet explorer. Neither Java Applet nor HTML Body bg color is white. I am kinda lost, and any help would really be appreciated.
    Thank you and look forward to hearing from someone soon.
    Sachin

    Hi,
    Well I used HtmlConver utility to generate applet html code, so I assume nothing is wrong with Object tag. Do you know what could cause this problem on Internet explorer? To be honest, I spent last couple of days, but I am just lost. It absolutely works fine on Netscape.
    Thanks,
    Sachin

  • Java Applet call javascript problem

    Hi I have a web page as follow and embedded a applet. The applet call the java script, and instead of showing an alarm, the browser show the javascript code. Is that strange ? Any suggestion for this problem.
    HTML:
    ================================================================
    <HTML>
         <HEAD>
         function ShowEmbd()
              alert("Test Applet call Javascript");
         </SCRIPT>
         </HEAD>
         <BODY>
         <FORM NAME="AppletEmbdStart">
              <OBJECT classid="clsid:48B2DD7B-6B52-4DB0-97C9-ECB940113B47" id="CIVON_DEmbdObj" width="0" height="0"></OBJECT>
              <APPLET code="MyApplet.class" width="0" height="0"></APPLET>
         </FORM>
         </BODY>
    </HTML>MyApplet.java
    =========================================================================
    import netscape.javascript.*;
    public class MyApplet extends javax.swing.JApplet
         private JSObject m_win = null;
         private JSObject m_doc = null;
         public void init()
              getJSWin().call("ShowEmbd", null);
         private getJSDoc()
              if(m_doc == bull)
                   m_doc = (JSObject) getJSWin().getMember("document");
              return m_doc;
         private JSObject getJSWin()
              if (m_win == null)
                   m_win = netscape.javascript.JSObject.getWindow(this);
              return m_win;
    }The page was load and it should call the applet MyApplet. The MyApplet should do the init() method and call the Javascript "ShowEmbd()", BUT, instead of show alert from ShowEmbd(), the browser show the code of ShowEmbd() itself ...... It did not run the javascript and shows the alert ??
    The browser shows a message from status bar "The applet not initial" ???? why ???
    Can anyone help ?!

    On first look:
    I am not sure about the Object Tag, but the Applet Tag requires the MAYSCRIPT attribute before Java can call Javascript.

  • Applet-Servlet Communication problem EOFException

    Hi! i´ve been searching and searching through forums because it seems this problem is very common, but none of the solutions i´ve seen so far suits me, so i´m here looking for some help because i´ve been stuck one week with this. First of all sorry if my english isn´t the best... i´m a bit rusty...
    Well, i had some code that worked perfectly, but i needed to perform some changes because i needed the servlet to send more info to the applet, and here started the problems, when i made the changes it started to throw EOFException when i was trying to read the InputStream, and furthermore when i came back to the original code it started to throw the exception in the same place too
    So here i am... don´t know what to do now and i entrust to you to give me some tips.
    Here comes some code. This is the original code, the one that runned but it doesn´t run right now
    Applet:
    public ListasComponentesSeleccionables cargarListasComponentes( ) throws IOException, ClassNotFoundException {
              String serv = "/Desaladora/cargarListasComponentesApplet.do";
              String host = Principal.documentBase.getHost( );
              URL direccion = new URL( "http", host, 8080, serv );
              // Create conection
              URLConnection connection = direccion.openConnection( );
              connection.setDoInput( true ); 
              connection.setDoOutput( true );
              connection.setUseCaches( false );
              connection.setRequestProperty( "Content-Type", "application/x-java-serialized-object" );
              ObjectOutputStream output;
              output = new ObjectOutputStream( connection.getOutputStream( ) );
              output.writeObject( new Boolean(true) );
              output.flush( );
              output.close( );
              ObjectInputStream input = new ObjectInputStream( connection.getInputStream( ) ); //<-- Here is the problem
              ListasComponentesSeleccionables response = new ListasComponentesSeleccionables( );
              response = ( ListasComponentesSeleccionables ) input.readObject( );
              return response;
         }Servlet:
    ublic class CargarListasComponentesAppletAction extends Action {
    public ActionForward execute(     ActionMapping mapping,
                                                     ActionForm form,
                                                     HttpServletRequest request,
                                                     HttpServletResponse response )
                            throws ServletException, IOException, Exception  {
              InitialContext context = new InitialContext();
              SensorManagerService sensor_service;
              ActuatorManagerService actuator_service;
              Globals.LOGGER_SECURITY.debug( "Entering ACTION 'CargarListasComponentesAppletAction'" );
              response.setContentType("application/x-java-serialized-object");
              try
                   ObjectInputStream bufferentrada = new ObjectInputStream(request.getInputStream());
                   Boolean peticionOK = (Boolean)bufferentrada.readObject();
                   ObjectOutputStream buffersalida = new ObjectOutputStream(response.getOutputStream());
                   sensor_service = ( SensorManagerService ) context.lookup( "desaladora/SensorManagerServiceBean/local" );
                   ArrayList<AlarmConnectedSensorDTO> sensorList = sensor_service.findAllSensorsToAlarms();
                   actuator_service = ( ActuatorManagerService ) context.lookup( "desaladora/ActuatorManagerServiceBean/local" );
                   ArrayList<AlarmConnectedActuatorDTO> actuatorList = actuator_service.findAllActuatorsToAlarms();
                   buffersalida.writeObject( crearListasSeleccionables(sensorList, actuatorList) );
                   buffersalida.flush();
              catch(Exception e)
                   System.out.println("Error en la trasmision de datos");
              return null;
         private ListasComponentesSeleccionables crearListasSeleccionables(ArrayList<AlarmConnectedSensorDTO> sensorList,
                    ArrayList<AlarmConnectedActuatorDTO> actuatorList) {
              Vector<Integer> vectorSensores = new Vector<Integer>();
              Vector<Integer> vectorActuadores = new Vector<Integer>();
              for(AlarmConnectedSensorDTO sensor : sensorList) {
                   vectorSensores.add(sensor.getIdSensor( ));
              for(AlarmConnectedActuatorDTO actuator : actuatorList) {
                   vectorActuadores.add(actuator.getIdActuator( ));
              ListasComponentesSeleccionables listasComponentesSeleccionables =
                                  new ListasComponentesSeleccionables(vectorSensores, vectorActuadores);
              return listasComponentesSeleccionables;
    }i´ve been running some test in another computer, and this code simply works, but it doesn´t work in the machine i usually work.
    Maybe someway the stream get corrupt? the info i´ve been trying to send and started throwing the exception may still be in the stream? I don´t know what to think right now.
    Hope someone has any idea, thankyou.

    I dont see the problem. However, I suggest you change this;
    System.out.println("Error en la trasmision de datos"); t
    to e.printStackTrace() to see what it is doing when it stops working.
    I also suggest peppering your code with System.out.println() statements to see what it is doing just before stopping.
    Also, try your code with a brand new file with only a few characters in it. If it works, add to it some of your originial file content until it stops working. This way, you can determine if its the file size that is causing the crash or something in the file content. If all else fails, study java I/O and try some other way to read/write the file. You can also try a different browser. If it works, its the browser. Still having problems? Create a new project with a simple applet and file read/write program and get that working. That way, all the other stuff in your original project isn't in the way.

  • Line Sizing Problem

    I am running several reports to produce PDFs that have an interesting behavior. When I publish a report out to our reports server, text in a text box is showing up at or near the top of the box that contains it. This report output does not look very good. On my desktop environment, when I run the report it produces a PDF with no sizing issues.
    I have read in several places that this might be a postscipt printer issue. So, I switched the printer on the report server machine to a postscript printer but it did not fix the problem. The font that I am using is Arial as that is the standard font that the client uses. The report server is 6. Any recommendations are appreciated.
    Thanks,
    Greg

    Greg,
    This is probably that server is not using the printer fonts for formatting and uses the system fonts.
    Please ensure you use the same printer / similar driver for both the desktop and server to see the effect.
    Also, the server if you run as service, by default it runs in the system login and the defaukt printer wouldn't be accessible. Please go to the services properties and ensure the login account has admin privilages to access the printer
    Thanks
    The Oracle Reports Team

  • Please Urgent sound applet in jsp problem

    Hi please any body hekp me urgently.
    I have a problem while playing a sound applet in the jsp file the error is class not found.
    My applet class file is in the com.mypack.common
    its code is
    public class PlayErrorSoundApplet extends Applet
    public PlayErrorSoundApplet()
    public void init()
    public void playSound()
    String soundObj = getParameter("soundObj");
    AudioClip sound = getAudioClip(getDocumentBase(), "success.wav");
    sound.play();
    in the jsp i have written the code like this
    <applet codebase="com.mypack.common" code="PlayErrorSoundApplet.class" name="soundApplet" width="0" height="0">
    <param name="soundObj" value="error.wav">
    </applet>
    In the applet console i got class not found error.
    please help me .....advanced thanks......

    actually, codbase is a directory. so
    <applet codebase="com/mypack/common" code="PlayErrorSoundApplet.class" name="soundApplet" width="0" height="0">
    <param name="soundObj" value="error.wav">
    </applet>this means you have something like
    pacakge com.mypack.common
    public class PlayErrorSoundApplet {
    Make sure to put the html file in the root directory of the package structure
    /myhtmlfile.html
       /com
          /mypack
               /common
                    PlayErrorSoundApplet.class                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Swing Applet in JSP: problem with fetching data from database

    i am facing a problem while fetching data from database using Swing Applet plugged in a JSP page.
    // necessary import statements
    public class NewJApplet extends javax.swing.JApplet {
    private JLabel jlblNewTitle;
    private Vector vec;
    public static void main(String[] args) {
    JFrame frame = new JFrame();
    NewJApplet inst = new NewJApplet();
    frame.getContentPane().add(inst);
    ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
    frame.pack();
    frame.setVisible(true);
    public NewJApplet() {
    super();
    initGUI();
    private void initGUI() {
    try {
    this.setSize(542, 701);
    this.getContentPane().setLayout(null);
    jlblTitle = new JLabel();
    this.getContentPane().add(jlblTitle);
    jlblTitle.setText("TITLE");
    jlblTitle.setBounds(197, 16, 117, 30);
    jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
    jlblNewTitle = new JLabel();
    this.getContentPane().add(jlblNewTitle);
    Vector vecTemp = getDBDatum(); // data fetched fm DB r stored here.
    jlblNewTitle.setText(vecTemp.get(1).toString());
    jlblNewTitle.setBounds(350, 16, 117, 30);
    jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));
    } catch (Exception e) {
    e.printStackTrace();
    }//end of initGUI()
    private Vector getDBDatum() {
    // fetches datum from oracle database and stores it in a vector
    return lvecData;
    }//end of getDBDatum()
    }//end of class
    in index.jsp page i have included the following code for calling this applet:
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
    width="600" height="300">
    <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>
    if i view it in using AppletViewer it runs perfectly and display the data in JLabel. (ie, both jlblTitle and jlblNewTitle).(ie, DATA FETCHES FROM db AND DISPLAYS PROPERLY)
    BUT IF I CLICK ON INDEX.JSP, ONLY jlblTitle APPEARS. jlblnNewTitle WILL BE BLANK(this label name is supposed to fetch from database)
    EVERY THING IS DISPAYING PROPERLY EXCEPT DATA FROM DATABASE!!!
    i signed the applet as follows :
    grant {
    permission java.security.AllPermission;
    Can any body help me to figure out the problem?

    This is the Swing Applet java code
    import java.awt.Dimension;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Vector;
    import javax.swing.tree.DefaultMutableTreeNode;
    import javax.swing.JScrollPane;
    import javax.swing.JApplet;
    import javax.swing.JButton;
    import javax.swing.JComponent;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JTree;
    import javax.swing.ScrollPaneConstants;
    import javax.swing.SwingConstants;
    public class HaiApplet extends javax.swing.JApplet {
         private JLabel     jlblTitle;
         private JLabel     jlblNewTitle;
         private Vector     vec;
         * main method to display this
         * JApplet inside a new JFrame.
         public static void main(String[] args) {
              JFrame frame = new JFrame();
              NewJApplet inst = new NewJApplet();
              frame.getContentPane().add(inst);
              ((JComponent)frame.getContentPane()).setPreferredSize(inst.getSize());
              frame.pack();
              frame.setVisible(true);
         public HaiApplet() {
              super();
              initGUI();
         private void initGUI() {
              try {               
                   this.setSize(542, 701);
                   this.getContentPane().setLayout(null);
                        jlblTitle = new JLabel();
                        this.getContentPane().add(jlblTitle);
                        jlblTitle.setText("OMMS");
                        jlblTitle.setBounds(197, 16, 117, 30);
                        jlblTitle.setFont(new java.awt.Font("Dialog",1,20));
                        jlblTitle.setHorizontalAlignment(SwingConstants.CENTER);
                        jlblTitle.setForeground(new java.awt.Color(0,128,192));
                        jlblNewTitle = new JLabel();
                        this.getContentPane().add(jlblNewTitle);
                        Vector vecTemp = getDBDatum();
                        jlblNewTitle.setText(vecTemp.get(1).toString());
                        jlblNewTitle.setBounds(350, 16, 117, 30);
                        jlblNewTitle.setFont(new java.awt.Font("Dialog",1,20));     
              } catch (Exception e) {
                   e.printStackTrace();
         }//end of initGUI()
         private Vector getDBDatum() {
              Vector lvecData = new Vector(10,5);
              Connection lcon = null;
              Statement lstmt = null;
              ResultSet lrsResults = null;
              String lstrSQL = null;
              String lstrOut = null;
              try {
                   OmmsDBConnect db = new OmmsDBConnect();
                   lcon = db.connectDb();
                   lstmt = lcon.createStatement(lrsResults.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   lstrSQL = "select DT_ID from P_DATATABLES";
                   lrsResults = lstmt.executeQuery(lstrSQL);        
                   int i = 0;
                   lrsResults.last();
                   int length = lrsResults.getRow();
                   System.out.println(length);
                   lrsResults.beforeFirst();
                   int recCount = 0;
                   while (lrsResults.next()) {
                        recCount++;
                        lvecData.addElement(new String(lrsResults.getString("DT_ID")));
                   //     System.out.println("ID :  " + lrsResults.getString(1));
                        i++;
                   }System.out.println("here 3 out fm while");
              catch(SQLException e) {
                   System.out.print("SQLException: ");
                   System.out.println(e.getMessage());
              catch(Exception ex) {
                   lstrOut = "Exception Occured " + ex.getMessage();
              finally {
                   try {
                        lrsResults.close();
                        lstmt.close();
                        lcon.close();
                        System.out.println("[DONE]");
                   catch(Exception e) {
                        System.out.println(e);
             }//end of finally
              return lvecData;
         }//end of getDBDatum()
    }//end of classOfcourse the above code compiles and runs well. in Applet Viewer
    I plugged the above Swing Applet in a JSP page index.jsp
    <jsp:plugin type="applet" code="NewJApplet.class" codebase="applets"
                   width="600" height="300">
         <jsp:fallback>Could not load applet...</jsp:fallback>
    </jsp:plugin>Every thing is working fine in AppletViewer...But if i view this in any browser, then only the jlblTitle is displaying. jlblNewTitle is not displaying(this label name is actually fetching from thedatabase)
    can any body help me regarding this matter.? Thx in Advance.

  • Applet - jar_cache.tmp problem

    Hi, i have problem with storing many jar_cache.tmp files in my temp directories.
    Those files are storing in temp directory every time when i start my applet or work with him.
    When I close my applet jar_cache.tmp files are staying in tmp directory. So, after a few days work with applet, I have a few thousands jar_cache files in /temp.
    I read that was similar bug in previous versions of java, but i use java 1.6...
    Can somebody please help me?
    Thanks in advance!

    Yes, that's true. But, is normal that java caching so many files in temp files anf doesn't delete them?
    I have example where is, after six months of using applet, in temp directory been stored about 100000 jar_cache.tmp files....
    Why java store tmp files in temp directory? I set directory for storing java temporary files to ...\Application Data\Sun\Java\jdk1.6.0_17\cache

  • Applet database access problems!

    Hi,
    I have a major problem. I'm trying to design an applet that can talk to a database server which is not the same server where the applet is hosted. I keep getting an exception like below: (note I changed my db server name)
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission aaaa.bbbbb.net resolve)
         at com.mysql.jdbc.Connection.createNewIO(Connection.
    help?

    Ok, I went back and re-read the answer to a similar question I asked earlier. Since I can't talk directly to the other db server, what is the work around?
    Make a php page that updates the database, then call that page from within the applet?

  • Compressor 2 Quicktime to iPod Sizing Problem

    Hello,
    As a podcaster, I have to convert regular quicktime files into iPod-compatible m4v format all the time. Usually I use Quicktime Pro to do this - its simple and I havent had any problems with it. But I'm looking for ways to reduce my file sizes, so I was looking into using Compressor for this.
    I used the new H.264 iPod video setting, but got an unsatifactory result that mystifies me:
    720x480 quicktime file, when converted via Quicktime Pro's iPod conversion, becomes 320x213 and looks fine.
    The same file, when run through Compressor's iPod setting, goes to 320x240, BUT it looks stretched vertically.
    Any ideas why this might be happening?
    Thanks,
    Simon

    Actually, 320x240 is the correct aspect ratio for playback on a computer display. NTSC TV is a 4:3 aspect ratio so the correct viewing format for your 720x480 clip is actually 640x480 (note that the latter is a 4:3 ratio). This confusion results from the fact that NTSC TV displays use rectangular pixels while computer display pixels are usually square. Thus, in order to get the correct aspect ratio during playback on a computer's square pixels you need to set the video to 640x480 or 320x240. However, if you plan on viewing the output on a NTSC TV then either 720x480 or 320x213 are acceptable since both of those will result in a 4:3 viewing ratio during full screen playback on the TV (the conversion happens "auto-magically" -- in effect -- since a standard definition TV has a 4:3 aspect ratio).
    Note further that the iPod video display is 320x240 (also 4:3) so I'd suspect that the best quality playback on the iPod would be obtained with a similar sized movie.

  • Applet.getImage(URL) problem

    My computer is installed with JRE7. I found that calling getImage from applet will send the request twice to the server. The request being send to server is http://server:8000/abc?id=100.
    The first request received by server is http://server:8000/abc%3fid%3d100. [which is failed]
    The second request received by server is http://server:8000/abc?id=100. [which is ok]
    My code simply call the following line once:
    theApplet.getImage (theApplet.getCodeBase(), "abc?id=100");
    Is this a bug in the Java plugin?

    I have had exactly the same problem with Applet.getImage.
    In previous JRE versions, Applet.getImage returned immediately,
    but this has apparently changed (I don't know at which version).
    I had to rewrite my program to use Applet.getToolkit().getImage
    - then the program worked as before...
    Looks like a bug to me.
    H�vard Tveite

Maybe you are looking for

  • Ibook clamshell battery issue

    Here's my issue: I was given a blue clamshell ibook to "fix" for a friend of mine who wants to use it to only surf the internet. They couldn't get it to turn on, it gave them a weird message and come to find out they had had it for a year and hadn't

  • Package Creation in JDev 10.1.2

    In JDev 11.1.2 you can create new packaages by right-mouse clicking on the project, then new, then general and selecting package.  How can you create new packages in JDev 10.1.2? Thanks

  • Oadutil error under Win2K

    I am trying to debug a Discoverer 3i Viewer install and I am running into a problem with oadutil. Whenever I try to run it I get the following error: "oadutil: .exe must be in your path." This occurs even when I try to execute it from the ORACLE_HOME

  • Quicktime fails to export video

    Hi, I have quicktime pro and was trying to export some videos for my iPhone. I'm having trouble with certain movies and i'm not sure why. They are all in the same format (H.264), but some of the videos won't export video, just the audio portion. When

  • .mov files nicht mehr lesbar unter LR 5.7.1

    Hallo nach update auf Lightroom 5.7.1 können keine .mov - files mehr gelesen und/oder bearbeitet werden. Woran liegt das? Bitte um Hilfe papamohr