How to make Fullscreen Applet

Hello ,
I am making slid show but need to be have full screen option . I searched for some example to find best way to do this task . I found this code but it`s not make full screen option when i am try to add to my code . I need someone to guide me for which way is best and high performance for this task .
Thanks

Sorry code is here , sorry if is not good .
package slidshow;
import javax.swing.*;
import java.awt.*;
import java.net.*;
import java.io.*;
public class Display extends JApplet {
     private Window mainWindow;
     private JPanel topPanel;
     private Panel bottomPanel;
     private URL myURL;
     private JEditorPane editorPane;
     public void init() {
          mainWindow = new Window(new Frame());
          // Get screen resolution and set mainWindow to fullscreen
          Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();
          mainWindow.setBounds(0, -128, ss.width, ss.height + 256);
          //set up main window layout
          mainWindow.setLayout(new BorderLayout());
          /** Get bounds of screen so we can ultimately split the
               window into two horizontally.
          GraphicsConfiguration gc = mainWindow.getGraphicsConfiguration();
          Rectangle bounds = gc.getBounds();
          double topPanelHeight = (ss.height * 0.5)+128;
          double bottomPanelHeight = (ss.height * 0.5);
          //Window size should be an integer (i.e whole number)
          int intTopHeight = (int)Math.round(topPanelHeight);
          int intBottomHeight = (int)Math.round(bottomPanelHeight);
          //Create Top Panel
          topPanel = new JPanel();
          topPanel.setPreferredSize(new Dimension(ss.width, intTopHeight));
          topPanel.setBackground(Color.blue);// May make this tranparent in the future
          topPanel.setLayout(new BorderLayout());
          //find out what the current directory structure is
          String codeBase = getCodeBase().toString();
          // Get page to load into top panel.
          try{
               myURL = new URL(codeBase + "hi.html");
          } catch (MalformedURLException mue) {
               System.out.println("Improper URL: " + mue.toString());
          // Create Editor Pane for top panel
          try {
            editorPane = new JEditorPane(myURL);
            editorPane.setBorder(null);
            editorPane.setEditable(false);
          } catch(IOException ioe) {
            System.err.println("Error displaying " + myURL);
          //Create JScrollPane, and place EditorPane in it.
          JScrollPane js = new JScrollPane(editorPane);
          js.setBorder(null);
          //Add Scroll pane to top panel
          topPanel.add(js, BorderLayout.CENTER);
          //Create bottom panel
          bottomPanel = new Panel();
          bottomPanel.setBackground(Color.black);
          bottomPanel.setPreferredSize(new Dimension(ss.width, intTopHeight));
          // add panels to window
          mainWindow.add(topPanel, BorderLayout.NORTH);
          mainWindow.add(bottomPanel, BorderLayout.CENTER);
          // make this visible
          mainWindow.setVisible(true);
And now I notice your screen name, I recall you made a very odd reply to an ongoing thread in which I am also participating. What was with that? Sorry I didn`t understand what is your question ?

Similar Messages

  • How to make another applet?

    Can somebody teach me how to make another applet besides the normal one the tutorial taught me?

    Your question is a litte unprecise. Just read on in the tutorial. When you finishd reading (and understanding) "Learning the Java Language" or when you dont understand something in the tutorial then you could ask again.

  • How to make fullscreen mode work using javascript

    1.I want to open the window in fullscreen mode.
    It works fine for internet explorer.
    But in netscape navigator 8.0 as the tab browsing is there
    The menu bar appears on the page.
    That i don't want.
    2. Also when the window opens in full screen mode and if after that
    i press the ctrl+N the new window doesn't open in full screen mode.
    Giving the sample code as below.
    So how to make it work in full screen mode in both cases.
    //The sample code is given
    //check.html
    <HTML>
    <HEAD>
    <TITLE> Full Screen </TITLE>
    <script type="text/javascript">
    <!--
    function myPopup() {
    window.open( "http://www.google.com/", "myWindow", "status = 1, height = 300, width = 300, resizable = 0,fullscreen=yes" )
    //-->
    </script>
    </head>
    <body>
    <form>
    <input type="button" onClick="myPopup()" value="POP!">
    </form>
    <p onClick="myPopup()">CLICK ME TOO!</p>
    </body>
    </HTML>Plz help me.
    Thanx in Advance.
    Reema.

    dont try to use a browser for what its not intended to do.
    A browser is never been intended to work in fullscreen mode. Trying to control the size a browser is displayed in, is considered bad practice and sites that do it are usually very annoying.

  • How to make an applet the default one ?

    Hi everybody,
    I have a NXP JCOP41 72k JavaCard, Eclipse 3.2 with jcoptools 3.1.2, jre 1.5.
    I have read in a lot of places that it was possible to make a specific applet the default one, meaning that my applet will reply to APDUs as soon as it is powered up... I don't want to go through the Card Manager and select my applet everytime it is power up.
    How can you do this, and at what level will I have to do it ?
    This is what I already tried:
    1- I have read through the GlobalPlatform specification, and they say that it is possible to put a certain flag on a application in order to make it default. So this is what I tried... I had my card in the OP_READY status mode, and I tried to put the application in the 'LOCKED' mode in order to make it the default application using the set-status APDU command from GlobalPlatform. It did not worked.
    2- After that, I tried something else. I put the card in the SECURED status mode, and I tried to put the application in the 'LOCKED' mode, but then I think I locked the card. I was not able to authenticate to the card anymore using the init-update command and the 255 keyset. How come the default keyset is not available anymore when you are in SECURED mode ???
    Again, how do you make an applet the default one ???
    Thanks a lot for answering,
    Richard Leroy

    Hi everyone,
    I finally have found the answer to my question, and felt important to let everybody know it ...
    In order to make an applet the default one, you need to upload it and install it with specific privileges...
    With gpshell, you need to add "-priv 4" to the "install" line in order to activate the default option. This will enable a specific flag for the applet.
    Once this is done, you will have to select the applet with the appropriate APDU, and your applet will be the default one.
    You can also get more informations on globalplatform spec 2.1.1 on page 107.
    Richard

  • How to make an applet load user-defined package?

    How to have an applet load user-defined package?
    I have packages in their own directories, and the applet compiles and links with them, by use of CLASSPATH env variable. But when it comes time to run, it ignores that and does not know where the classes (in the packages) are.
    If I don't use packages and put all code in one directory, runs fine. If I use an application, I can link with and load my packages.
    I know applets can't use things like CLASSPATH for security reasons, but still, they should be able to be compiled out of several packages, why do I have to put all code together??

    OK, for reference for future newbies, here's the answer:
    use CODEBASE attribute in your html file (if on Windows server, don't use drive letter but relative path to .html file, Unix style, and put all your .class files beneath that, for example, in your .html file
    <applet
    CODEBASE="..\class
    and then have package bar Bar.class file, in ..\class\bar

  • HT1677 How to make fullscreen for safari on iphone

    Hayyy i can not make fullscreen on safari

    Landscape mode. The icon to do so will appear in the bottom right corner.

  • How to make an applet to read the Text file present inside a jar

    Hi All,
    I have writen one applet named ReadFile.java which reads a text file present in the same directory and does some manipulation of text file contents.
    The applet code runs successfully when i run the applet in command prompt like
    {color:#ff0000}*java ReadFile*{color}
    And i am getting the needed results.
    Then i made a jar file with the applet code and text file as
    {color:#ff0000}*jar cvf rf.jar ReadFile.class File1.txt*{color}
    Then i have inlcuded this applet inside a html file as
    {color:#ff0000}*<applet code= "ReadFile.class" width= "500" height= "300" archive = "rf.jar" ></applet>*{color}
    after this when i load the html file, the applet code is not executed fully. Its throwing FileNotFoundException: File1.txt.
    Applet is not recognizing trhe text file present inside the jar file.
    Can any body explain me how to overcome this problem. Any setting needs to be done for making the applet indicate the presence of Text file inside the jar file.

    what code in your applet gets the text file and reads it? are you using getResource or something similar?

  • How to make my applet generally available?

    Hello
    I have written a HTML/javascript website which is ok except that a lengthy calculation in the javascript takes an excessive time to complete. So I have recoded the lengthy calculation as a java applet which is called from javascript by
    return = document.<classname>.<java method name>(param)
    This was done using the J2SE Development Kit 5.0 Update 4 and J2SE Runtime Environment 5.0 Update 4. My PC is Windows XP and I use Internet Explorer 6.0.
    All screen handling is still done by HTML/javascript, the java applet has no i/o apart from receiving a parameter from js and returning a value to js. This all worked fine locally, so I copied all files to my ISP's server (including the java class file) and it still works fine on my PC when accessed from the server. HOWEVER when any other PC enters the website and attempts to perform the calculation they just get an Error on Page message from the javascript link to the java applet. What do I have to do to make the application run on other people's PC's as it does on mine? I have set permissions on the class file to 755. Do I need a policy file? Do I need to sign my applet? (whatever that means).
    Thanks
    Bryn Crossland

    For a start, very few people will have Java 1.5 installed and set up for their browser. I think applets are great (if they are doing something useful), but these days you cant depend any everyone having a JVM installed for their browser, especially since microsoft ripped Java out of XP.
    Maybe you could do the "lengthy calculcation" on the server.

  • How to make fullscreen state machine globals.vi file

    We're using a state machine globals.vi file to display something and we would like to have the displayed information fullscreen, that is without the scroll bar or window parameters at the top. How could we go about doing this?

    you need to set the runtime windows options.
     go to File>VI properties>Window appearance>custom. 
    and  File>VI properties>Window size
    and File>VI properties>Window position.
    All the properties have help associated with them so it should be relativly easy to select the desired customizations
    Jeff

  • How to make an applet with curved edges in the browser

    Hi all,
    I m doing an applet application in which i want to show an image inside a player in the website. The edges of the player is designed in curved shape. So i too wanted to do an applet with curved edges. Otherwise my applet and the images are coming out of the player... do any body have come across such a problem. please give me some suggestions. Awaiting for your suggestions and solutions. If u don't understand what i m trying to say let me know..
    Thanks...

    I tried to get the screen height -1 and subtract from
    all the ys in my applet but it doesnt work all the
    time. I am drawing shapes and stuff with an algorithm
    I wrote for class.
    is there a way to get origin(0,0) to the lower left
    screen easily.
    thanksThe only way I can think of would be write a method to convert a "normal" y coord to an applet y coord. That would probably end up being a huge pain in the ass, since you would have to pass all y coords through it before using them, so I suggest you just get used to y being upside down.

  • How to make my applet run in eclipse browser..?

    I wrote an applet and it works fine when it is run as an applet in eclipse galileo.I need to embed it in a web page.I have searched this forum but unable to find adequate information.It is also not reporting any errors.Html file looks as below
    <html>
    <head>
    <title>Echo Applet</title>
    </head>
    <body><h1>This is an example of applet</h1>
    <applet code=com.mypackage.EchoApplet.class width="400" height="400"></applet>
    </body>
    </html>Directory structure is as below
    MyFirstApplet
           ->Java Resources:src
                 ->com.mypackage
                          ->EchoApplet.java
                 ->Libraries
          ->WebContent
                ->META-IMF
                          ->MANIFEST.MF
                ->WEB-INF  
                          ->lib
                          ->web.xml
                ->MyFirstApplet.htmlConsole of html file shows as below
    26 Aug, 2009 8:09:04 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8084
    26 Aug, 2009 8:09:04 AM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2036 ms
    26 Aug, 2009 8:09:04 AM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    26 Aug, 2009 8:09:04 AM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.25
    26 Aug, 2009 8:09:04 AM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    26 Aug, 2009 8:09:06 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    26 Aug, 2009 8:09:06 AM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8084
    26 Aug, 2009 8:09:06 AM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8085
    26 Aug, 2009 8:09:06 AM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/53  config=null
    26 Aug, 2009 8:09:06 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 1992 msany clue of where i might have gone wrong??Thanks in advance..!

    hello,
    the very first thing is the html console always look the one which you have posted here.it tells that server is started.
    directory structure is also ok.
    wi think the problem lies in the html file.After defining applet class you have to specify the jar file of your appletin the mannerarchive = "yourapplet.jar" have you any libraries with your applet? if yes then you have to include it in archive information
    i would like to know when you run this application does internet explorer opens if yes then can you tell me the error it is giving

  • How do I make an Applet read a file on my web host?

    How do I make an Applet read a file on my web host?
    I am wanting to put a file on my web host that has usernames and user details and other stuff on it...
    I was wondering whether anyone knows how to make the Applet open a file on my webserver, check if the username exists, if not add to the file the username and details?
    thanks

    URL myURL = new URL(getDocumentBase(), filename);
    InputStream myInputStream = myURL.openStream();
    DataInputStream dis = new DataInputStream(myInputStream);
    String oneLine = dis.readLine();
    Use output stream for writing..
    hope this works !!!

  • How to  make a good voip server +applet ?

    Here is my applet wich I made http://84.244.8.225/test.html
    It works a bit
    Here the code:
    http://84.244.8.225/javamic4.txt
    Any ideas/suggestions to make it better...
    (for example how to make a good server (windows) ?)
    Thx!
    Edited by: FrederikPot on Sep 24, 2007 3:01 PM
    Edited by: FrederikPot on Sep 24, 2007 3:03 PM
    Edited by: FrederikPot on Sep 24, 2007 3:07 PM

    Hello Thanks for your replys and sorry for being so fussy about this.
    I have now seen that one of the options for exporting from Premiere 6.5 is Adobe MPEG encoder. So Do you guys think it would be a good idea to do it with that, Or Would it be better AVI or DV AVI compressor from Premiere before making the DVD?
    I have the Nero Vision 4.9.6.6  But I may be able to look for another one if you think it is better...
    Thanks a lot for your advises...

  • How to make my screen fullscreen

    some how my screen isnt fullscreen and i dont know how to make put it back to how it was before. All my windows and everything are smaller

    Ful lscreen window
    http://support.apple.com/kb/PH11359

  • How to make Applet working -.

    I am trying to use an Applet from web.
    ( http://www.sanger.ac.uk/Users/kmr/d/start.html )
    What are the softwares i should install inorder to make the Applet working ? . or is it problem of Applet?
    In all the machines in our network the applet is not working.
    I tried it in IE 5.0 and Java plugin( Windows 2000) , and on Netscape Navigator 6.2 (Red hat Linux ).
    I get an error message i java console
    I m behind a firewall , is firewall can revoke applets ?
    Any help will be cordially appreciated.
    Renjith

    Run the HTML source through the Java HTMLConverter.Can u make bit more clear ?
    How can we obtain Java HTMLConverter
    regards
    Renjith

Maybe you are looking for

  • Photoshop CS2  & Catalyst

    I have Photoshop CS2, Does catalyst works with the cs2 files?

  • DB13 job failed due to SXPG_COMMAND_EXECUTE error

    Hi, I received an error when I try run the BRCONNECT Database Action Calendar (tx. DB13), either it's a Database check, statistics updates, etc. The error messages are as follows: Job started Step 001 started (program RSDBAJOB, variant &0000000000166

  • Async Web Service Client - Initialization

    Hi @ll A simple WS client can be initialized manually like: service = new BasicReferenceService_Impl(referenceServiceWSDL); port = service.getReferenceServiceSOAPjms(); If you do async calls over e.g. jms then you have to use annotations and define t

  • Texts not sending on 1st try

    I have a Samsung Note 3 and at least 2-3 times a day I receive a message that says unable to sent text message, try again. Normally will go thru 2nd or 3rd time. However the person receiving the text will get the text multiple times. Any help or idea

  • HT4858 Do i need a viewer on my computer?

    Do i need some sort of viewer on my computer to view pic from my streaming pic?