Deploy swing JApplet: html embed vs floating window

Is there a difference in performance between having a JApplet embedded in HTML vs having the JApplet run in a floating window? Thanks in advance.

Doubt that anyone can give an accurate answer. Try testing (set up some repetitive loop) and find out.

Similar Messages

  • How to prevent Windows Media Player plug-in from overriding sizing in html embed code?

    My html code for embedding Windows Media Player into a frame recently developed problems in Firefox but not IE 8. The player displays properly at first, but then repositions and resizes. It seems my width setting is honored, but not my height setting. Also, autoplay="false' (or "0") additionally is not honored- the video starts playing after the repositioning and resizing. I have tried different embed code with the same result. I have the correct Windows Media Player Firefox Plug-in and it is up to date. I tried updating to Firefox version 9.0.1, but the problem persists. I've come across web postings positing the plug-in settings are overriding embed code. Any workarounds appreciated. Thank you.

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • How do a float window with swing?

    How do a float window with swing?
    If you have JBuilderX, the float window likes JBuilderX's structure pane.
    Thanks Advance!

    It can't be resize and must be add to the panel that *.getContentPane()

  • NoClassDefFoundError:javax/swing/JApplet  while running japplet in browser

    hai to all,
    i am trying to run a Japplet in broser,
    it's getting NoClassDefFoundError:javax/swing/JApplet
    on statusbar.
    any plugin's are requitred to run swing applets in browser.?please give me details.
    my JApplet is working in Applet viewer.
    i am using Jdk1.3.1, and Applets are also running in my browser(both IE and NetScape).
    thank you in advance
    please mail me to [email protected]
    by
    sambareddy

    I had the same problem when I was developing a swing applet to run on the web. What you have to do is convert your HTML file. It takes out the APPLET tags and replaces them with OBJECT and EMBED tags. This worked for me. I downloaded the converter from the Java site but I cannot recall exactly where. I think if you search for converter you should be able to find it. The newly converted HTML file will also prompt the user to download the correct plug-in if it is not already installed on their machine.
    In the mean time, try using the HTML code below. You will have to change some of the lines but it should work for you. The OBJECT tag is used for IE and the EMBED tag is used for Netscape so don't forget to change both. One wierd thing you will see is that is if you run appletviewer on the converted HTML file, two windows will pop up and one of them will have errors and not load but one will. Don't worry about that, when you run it through the web server, everything works fine.
    Good luck.
    <HTML>
    <HEAD>
    <TITLE>Your title</TITLE>
    </HEAD>
    <BODY>
    <CENTER>
    <!--"CONVERTED_APPLET"-->
    <!-- HTML CONVERTER -->
    <OBJECT classid="clsid:E19F9330-3110-11d4-991C-005004D3B3DB"
    WIDTH = 550 HEIGHT = 300 codebase="http://java.sun.com/products/plugin/1.3.0_01/jinstall-130_01-win32.cab#Version=1,3,0,1">
    <PARAM NAME = CODE VALUE = "the name of your class file" >
    <PARAM NAME = CODEBASE VALUE = "location of the class or jar file">
    <PARAM NAME = ARCHIVE VALUE = "name of your jar file, omit this entire line if you do not have a jar file" >
    <PARAM NAME="type" VALUE="application/x-java-applet;jpi-version=1.3.0_01">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED WIDTH = 550 HEIGHT = 300 type="application/x-java-applet;jpi-version=1.3.0_01" CODE = "name of your class file" CODEBASE = "location of the class or jar file" ARCHIVE = "name of your jar file, omit this entire arg if you do not have a jar file" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3.0_01/plugin-install.html">
    </EMBED>
    </CENTER>
    </COMMENT>
    </OBJECT>
    <!--
    <APPLET CODE = "name of your class file" ARCHIVE = "name of jar file if you have one" WIDTH = 700 HEIGHT = 400>
    </CENTER>
    </APPLET>
    -->
    <!--"END_CONVERTED_APPLET"-->

  • Editing the position of a floating window video for an interactive PDF

    I'm fairly new to InDesign CS5's interactive features, so forgive me if I'm making a blatant mistake. However, everything I have read about floating windows says that you can easily adjust the size and position in the Interactive PDF options dialog and I am not able to. I have no problem getting the video to play in a floating window, the problem is that I am unable to change the position settings. It is locked as "centered" though when I view the PDF, the window pops up in the upper right and extends beyond the frame of my window. How do I unlock the position settings and get it to actually play centered?
    I have tried this using a placed .mov video and I also tried converting it to a F4V file, because I read those worked better, but still no luck.
    Is anyone else experiencing this problem? Any solutions?
    Thanks!

    PDF (Portable Document Format) used to be a proprietary standard developed by Adobe Systems. A few years ago, they decided to make it an international standard, no longer proprietary: ISO 32000.
    http://www.adobe.com/devnet/pdf/pdf_reference.edu.html
    International standards are managed by standards organizations which meet with a committee structure. As such, they are slower to adapt to new techologies.
    By contrast, Adobe Digital Publishing Suite, it an active, rapidly-changing, PROPRIETARY set of applications and cloud-based services.
    Both models have their advantages and disadvantages.

  • Fix for PENDING in javax.swing.text.html.ParagraphView line #131

    Investigating source of HTMLEditorKit I found many PENDING things. That's fix for one of them - proper minimal necessary span detecting in table cells.
    Hope it will help to somebody else.
    import javax.swing.*;
    import javax.swing.text.html.*;
    import javax.swing.text.html.ParagraphView;
    import javax.swing.text.*;
    import java.awt.*;
    import java.text.*;
    import java.util.ArrayList;
    public class App extends JFrame {
        public static String htmlString="<html>\n" +
                "<body>\n" +
                "<p>The following table is used to illustrate the PENDING in javax.swing.text.html.ParagraphView line #131 fix.</p>\n" +
                "<table cellspacing=\"0\" border=\"1\" width=\"50%\" cellpadding=\"3\">\n" +
                "<tr>\n" +
                "<td>\n" +
                "<p>111111111111111111111111111111111<b>bold</b>22222222222222222222222222222</p>\n" +
                "</td>\n" +
                "<td>\n" +
                "<p>-</p>\n" +
                "</td>\n" +
                "</tr>\n" +
                "</table>\n" +
                "<p></p>\n" +
                "</body>\n" +
                "</html>";
        JEditorPane editor=new JEditorPane();
        JEditorPane editor2=new JEditorPane();
        public static void main(String[] args) {
            App app = new App();
            app.setVisible(true);
        public App() {
            super("HTML span fix example");
            setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JSplitPane split=new JSplitPane(JSplitPane.VERTICAL_SPLIT, createFixedPanel(), createOriginalPanel());
            getContentPane().add(split);
            setSize(700, 500);
            split.setDividerLocation(240);
            setLocationRelativeTo(null);
        JComponent createOriginalPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Original HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new HTMLEditorKit();
            editor2.setEditorKit(kit);
            editor2.setContentType("text/html");
            editor2.setText(htmlString);
            p.add(new JScrollPane(editor2), BorderLayout.CENTER);
            return p;
        JComponent createFixedPanel() {
            JPanel p=new JPanel(new BorderLayout());
            p.add(new JLabel("Fixed HTMLEditorKit"), BorderLayout.NORTH);
            HTMLEditorKit kit=new MyHTMLEditorKit();
            editor.setEditorKit(kit);
            editor.setContentType("text/html");
            editor.setText(htmlString);
            p.add(new JScrollPane(editor), BorderLayout.CENTER);
            return p;
    class MyHTMLEditorKit extends HTMLEditorKit {
        ViewFactory defaultFactory=new MyHTMLFactory();
        public ViewFactory getViewFactory() {
            return defaultFactory;
    class MyHTMLFactory extends HTMLEditorKit.HTMLFactory {
        public View create(Element elem) {
            View v=super.create(elem);
            if (v instanceof ParagraphView) {
                v=new MyParagraphView(elem);
            return v;
    class MyParagraphView extends ParagraphView {
        public MyParagraphView(Element elem) {
            super(elem);
        protected SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r) {
            r = super.calculateMinorAxisRequirements(axis, r);
            float min=getLongestWordSpan();
            r.minimum = Math.max(r.minimum, (int) min);
            return r;
        public float getLongestWordSpan() {
            if (getContainer()!=null && getContainer() instanceof JTextComponent) {
                try {
                    int offs=0;
                    JTextComponent c=(JTextComponent)getContainer();
                    Document doc=getDocument();
                    int start=getStartOffset();
                    int end=getEndOffset()-1; //don't need the last \n
                    String text=doc.getText(start, end - start);
                    if(text.length() > 1) {
                        BreakIterator words = BreakIterator.getWordInstance(c.getLocale());
                        words.setText(text);
                        ArrayList<Integer> wordBounds=new ArrayList<Integer>();
                        wordBounds.add(offs);
                        int count=1;
                        while (offs<text.length() && words.isBoundary(offs)) {
                            offs=words.next(count);
                            wordBounds.add(offs);
                        float max=0;
                        for (int i=1; i<wordBounds.size(); i++) {
                            int wStart=wordBounds.get(i-1)+start;
                            int wEnd=wordBounds.get(i)+start;
                            float span=getLayoutSpan(wStart,wEnd);
                            if (span>max) {
                                max=span;
                        return max;
                } catch (BadLocationException e) {
                    e.printStackTrace();
            return 0;
        public float getLayoutSpan(int startOffset, int endOffset) {
            float res=0;
            try {
                Rectangle r=new Rectangle(Short.MAX_VALUE, Short.MAX_VALUE);
                int startIndex= layoutPool.getViewIndex(startOffset,Position.Bias.Forward);
                int endIndex= layoutPool.getViewIndex(endOffset,Position.Bias.Forward);
                View startView=layoutPool.getView(startIndex);
                View endView=layoutPool.getView(endIndex);
                int x1=startView.modelToView(startOffset,r,Position.Bias.Forward).getBounds().x;
                int x2=endView.modelToView(endOffset,r,Position.Bias.Forward).getBounds().x;
                res=startView.getPreferredSpan(View.X_AXIS)-x1;
                for (int i=startIndex+1; i<endIndex; i++) {
                    res+=layoutPool.getView(i).getPreferredSpan(View.X_AXIS);
                res+=x2;
            } catch (BadLocationException e) {
                e.printStackTrace();
            return res;
    }Regards,
    Stas

    I'm changing the foreground color with
    MutableAttributeSet attr = new SimpleAttributeSet();
    StyleConstants.setForeground(attr, newColor);
    int start=MyJTextPane..getSelectionStart();
    int end=MyJTextPane.getSelectionEnd();
    if (start != end) {
    htmlDoc.setCharacterAttributes(start, end, attr, false);
    else {
    MutableAttributeSet inputAttributes =htmlEditorKit.getInputAttributes();
    inputAttributes.addAttributes(attr);   

  • How do I keep a floating window on top of a tabbed document so that it can be used as a reference while drawing/painting?

    Just started using Photoshop CC on my iMac and I have noticed this issue which I did not have using windows based computers. Any floating window just seems to hide in the background as soon as I click on the tabbed document I want to work on. This is an issue for me since I like to have a couple of references open while painting plus I always have another with nothing but my color palette in it. I've already gone over the preferences but can't seem to find the way to avoid this and the options from Widow>Arrange weren't any help also resizing all windows so that they don't overlap each other ends up wasting a lot of screen real estate.

    c.pfaffenbichler meruhelp this is what I'm used to in Windows windowsWORKSPACE | Flickr - Photo Sharing! and yes the active document does not need to be the top most window. This enables me to have my references as floating windows and keep them where I need them as I paint.
    This is what I have to do while working on my Mac macWORKSPACE | Flickr - Photo Sharing! keeping references to either side using floating windows or options from Window>Arrange. If I drag them closer to the area I want to work on, the window will either disappear behind the active document window or it will overlap as you can see in the two images in the top left corner. Aside from the extra work from rearranging windows this way I feel that I'm loosing a good chunk of screen (see yellow striped area).

  • What is the keyboard shortcut to close a floating window?

    Hiya, just upgraded to Logic 9 from 7 and I can't close floating windows with option-w.
    Is there a way I can close floating windows without using my mouse?
    Thanks
    Alistair

    r0cker2 wrote:
    Thanks for the quick reply
    I am trying to close floating windows (effects and instruments) using ALT-W not CMD-W.
    Ah, okay, never used that one. Have you checked your *Key Commands* that this shortcut actually still is assigned? Even if it is, it might just help to reassign it (to the same keycombo).
    (much later:)
    Mm, I did a search of Logic key commands, but I cannot find any command that closes floating windows, alt-W is not a default shortcut for anything... to what command exactly did you assign alt-W?

  • How do I change position of video floating window in IDCS5 PDF export?

    I have created an interactive document in InDesign CS5 (for Mac) that includes some movies. The page size is 1280 x 800 and the H264.mov files are 960 x 540 and 800x600. I place the movie in the center of the page at 100% size (without resizing either the movie object or the frame). The poster is set to None to keep it blank. In the PDF options, the Play Video in Floating Window box is checked, with the size set to 1x and the Position is set to Center by default but it is grayed out, with no option to change it.
    When I export the document to PDF (Interactive) with both View and Layout set to Default and Buttons and Media set to Include All, the resulting PDF file opens the movie window in the upper right corner of the PDF document window. It does this whether viewing in Acrobat X Pro (10.1.2) or Acrobat Reader (9.5.0). I've tried opening the file on other computers and have the same issue. I've also created the same document in IDCS5.5 with the same outcome.
    I'd like the movie to open in the center of the PDF document window. I've made other documents where it does this, but for the life of me can't figure out what I'm doing differently to cause the floating movie window to open in the upper right corner of the PDF document.
    Any insight you could provide would be very helpful.
    Thanks,
    John

    Thanks for your reply, Steve. I, too, believe there is a bug, but it's not in InDesign CS5, as I mentioned in my post, I was able to replicate the problem by opening the file in CS5.5 and exporting it to an interactive PDF. The movie again opens in the upper right corner.
    However, if I create a NEW page in the document and place the same movie. it opens in the PDF reader centered in the page. I guess I could recreate the document if this is the only fix, but I thought that I may be doing something wrong, which apparently is not the case.
    "Computers often do what you want them to, but they ALWAYS do what you tell them to."   —anonymous
    "If you have placed the video in InDesign in it's own frame, should you not leave this box unchecked?"
    Rik, I didn't actually place the movie into a new frame. What I meant to say was that once the movie was placed into the document, I did not resize it. I found that if I don't have the PDF viewer open the movie in a flaoting window, the movie quality suffers if the PDF viewer opens in a larger size than the original InDesign page size (which can happen depending on how the user's PDF viewer is configured). However, the movie plays and views perfectly if it is in a floating window.
    jh

  • Can one create a floating window using JSF?

    I was recently shown the interface for GMail. I don't have a GMail account, but one of the things I was asked to investigate was whether or not we can create the sort of floating window that appears on the GMail interface when one positions the mouse pointer over a cell on the grid showing the email messgaes. We have a grid on our JSF page, that shows specific data for items we're supporting, and it would be useful if we could have something like a mouseover event handler for each table row, and in that event handler show a window with a graphic specific to the data in that row, and the chart would move with the mouse pointer, perhaps changing the graphic if the mouse pointer is moved over a different row in the data table.
    Can we do this using JSF? If not, what alternative can you suggest that would provide a reasonable facsimile to this kind of user friendly feature?
    Thanks
    Ted

    "Core JavaServer Faces" Second Edition, by David Geary and Cay Horstmann, copyr 2007 - ISBN: 0-13-173886-0 - (it put me back USD $50, but well worth it). Page 644 gives two examples of how to generate a pop-up window. They give two examples because of problems that can arise when you transfer data between the main window and the pop-up. I do not want to violate copyright and there are ten pages of text devoted to this topic, so I'll just present some tickler code - if you cannot afford the book, maybe you can google on some terms. Sorry, I feel this is as far as I can go on this, I hope this helps some!
    The first example uses a JavaScript call:
    popup = window.open(url, name, features);
    popup.focus();
    where 'features' is a string like "height=300,width=200,toolbar=no,menubar=no"
    The second example creates the pop-up form using a hidden field like this:
    <h:form id="hidden" target="popup">
    <h:inputHidden id="country" value="#{bb.country}"/>
    <h:commandlink id="go" action="showStates"/>
    </h:form>

  • How to create floating windows in InDesign for images

    Hi guys, any help on this would be much appreciated.
    I'm designing a document in InDesign that will be exported as an interactive PDF, and within the pages, I have some thumbnail images which, once clicked, will need to open a floating window in the document with the full image. Just wondering if anyone could please help me out with some instructions on how to do so.
    I don't want it to open a browser window, therefore just attaching a hyperlink to a web address is not what I'm after. What I'm hoping is the images can be embedded within the document, and then activated once the thumbnail is clicked.
    Hope that makes sense but if you need me to clarify anything please ask.
    I'm using CS6.

    Go to Tv.Adobe and do a search for interactive and/or object states.
    One other note: search for the topic with workflow export to SWF and replace in PDF.
    If you don't want SWF, then only use buttons (no object states).
    If you don't mind Dutch, take a look at a video at my blog about pop up in PDF etc:
    http://fvdgeest-dtp.blogspot.nl/2012/10/interactieve-knoppen-in-pdf-zonder.html

  • Floating windows in Tiger, Right-Click

    As a fan of keyboard control I appreciate the extend to which Mac OS X is made simple without the use of a mouse. One thing I have not been able to figure out is how to close a floating window. For example, try this: "Get Info" on a folder or object in Finder by using Alt-Command-i; this brings up a floating window that does not share the ordinary properties of a Finder window, i.e. it cannot be closed with Command-w, it will not appear in Exposé operations, etc.
    You can use Control-F6 to give it focus and be able to cycle through its controls, but this seems to be only semi-focus. A Command-w action will still close the window behind it (or, if on Desktop, do nothing).
    Let me know if there is a way to close a floating window from the keyboard.
    Secondly, is there a surefire method for right clicking ('Control-Clicking') built-in to the operating system using only keyboard commands?
    Thanks for your help on this guys.
    iMac G5 1.8Ghz   Mac OS X (10.4.2)  
    iMac G5 1.8Ghz   Mac OS X (10.4.2)  

    Hello WickEd Z, I just checked and mine works fine! I can open Finder>Get info,
    then I can close any window just by the Command+W, so all I can think of is that you'll have to check & see your lay-out in System-preferences.

  • Float windows

    I am trying to float all windows in my copy of E 10. I click on Window>images but the float window tab is not highlighted. Anyone know how to do this
    John

    Hi John
      Click on the menu:
    Edit >> Preferences >> General
    Then check the box “Allow Floating Documents in Full Edit”
    Click OK

  • PS CS4 histogram and floating windows

    How do I get Photoshop to open with floating windows and the histogram in compact RGB mode? I have to reset this every time I open a new photo. I can't believe how hard it is to change modes in the histogram.I have to undock it, change it to expanded view, change the mode, change it back to compact view and redock it. This made sense to someone? I tried saving the workspace, but that doesn't solve the problem.

    Oops

  • Unable to set classpath javax/swing/japplet in Linux

    Hi,
    I have a problem in running an Applet program in Linux. If I run I get the following message.
    "Javax/swing/JApplet error Java.lang.NoClassDefFound Error".
    I have set my .bash_profile as follows:
    CLASSPATH=/usr/java/jdk1.3_0_01/jre/lib
    CLASSPATH=/usr/java/jdk1.3_0_01/lib
    CLASSPATH=/usr/java/jdk1.3_0_01/
    EXPORT
    Please tell me whether I have created the .bash_profile correctly. or anything to be changed. It will be great help if anybody hep in this regard. I am held up in my project.
    Thnaks.
    Mari
    11/09/02

    You don't need to set the CLASSPATH to get javax.swing.JApplet - the JVM "automagically" knows where the rt.jar file is. The only items you need in your CLASSPATH environment are third-party .jar files.
    I'm taking a wild guess based on your subject line, but I'll bet you mis-typed the ClassName - "JApplet," not "japplet." Your code should have
    import javax.swing.JApplet;in it.

Maybe you are looking for

  • Can not select from gv$ table in trigger...please help.

    I have the following SQL in my trigger which I am using in mt cursor. cursor sessioninfo is     SELECT s.LOGON_TIME,            i.INSTANCE_NAME,            s.SERIAL#,            s.MACHINE,            s.PROGRAM,            s.MODULE       FROM gv$SESSI

  • How do I ungroup the pages in my doc, I need to move the first to the end, and it shows me all the pages are in a group

    On Pages:  I need to move the first page of my document to the end, and it shows me all the pages are in a group.  How do I ungroup the pages in my doc. 

  • Microsot wireless keyboard 3000 v2 and osx 10.8.4

    My keyboard was working well until this update came along and fudged it up.  When i press the space key its like pressing command/option and a.  Likewise with y and p.  It makes the computer impossible to use and I am typing this from a smart phone. 

  • Netbook wont start

    wew, where do i start,,, ummm, i tampered with the battery and when i inserted it on the netbook something burned (i saw smoke coming out of the board where the battery is inserted particularly the positive and negative or inbetween them), why, becau

  • Mixing Ken Burns effected images w/ stills

    I'm creating a slideshow that mixes images with the Ken Burns effect on, and images with the effect turned off. I've noticed that when I place a non-Ken Burns'd image immediately after a Ken Burns'd image, the playback isn't accurate. The still image