Fade a JEditorPane

Hi,
I've been struggling with this problem for days now. I'm displaying HTML pages in an JEditorPane so that I can control the content from my webapp. The JEditorPane is placed in a JPanel (called mainpanel) togheter with another JPanel (with some buttons which I call toppanel). I place the TopPanel at the top of the MainPanel and the JEditorPane in the bottom (so the TopPanel becomes like a menu). I then use setPage on the JEditorPane to switch the different views (HTML pages).
What I would like to do when I change the HTML page is to fade the JEditorPane. For example
public void changePage(String url)
JEditorPane.fadeOut(); <----DONT KNOW HOW TO DO THIS
JEditorPane.setPage(url);
JEditorPane.fadeIn(); <----DONT KNOW HOW TO DO THIS
The fade should be done without affecting the TopPanel.
Ive tried different solutions to do this:
1. Using GlassPane - but I could get it to work.
2. Using a javabrowser and then run javascript to fade. This didn't work because of license issues and because how it was designed (I have thread changing the content and that was not allowed)
Could someone help in simply fading in and out the EditorPane itself.
BR, Jake

JAKE142 wrote:
..Could you please give me a code sample?
Can u gimme da codez? (1)
How about you give us a 'code sample' of your best effort of implementing the suggestion? Note also:
- For better help sooner, post an SSCCE.
- When posting code, code snippets, HTML/XML or input/output, please use the code tags. The code tags protect the indentation and formatting of the sample.
- Be very specific about what you saw in the current code, and what you expected or hoped to see.
..I think I tried it but without success.1) You did succeed in sounding pathetic. As an aside, that will get you less help, not more.

Similar Messages

  • Can't fade more than one region at a time?

    Tell me this isn't so... I'm reading the manual, maybe I'm over looking it, I've selected multiple files and tried to use the fade tool and no dice - is this for real? It can't be done?

    1. Select the regions.
    2. In the Region Parameter Box in the Inspector, you can choose fade types, times, etc.

  • Repaint a JEditorPane after inserting data in the Document

    Hi,
    I have a button that inserts some text in a Document using the method insert(int offset, ElementSpec[] data)After that insert, the View recalculates the heights of the text lines, but they don't get refreshed on the JEditorPane. I have to manually insert a new line to make the JEditorPane get updated with the new line height.
    I have tried using invalidate() and repaint() but nothing happens. Is there another way to refresh the contents of the JEditorPane?
    Thanks!!

    revalidate() didn't work. I still have to press "enter" in any part of the document in order to have the line height changed. The method that recalculates the height of the line is View.getPreferredSpan(int) but it isn't called until I insert a new line by pressing enter.
    I think now it's not a repainting issue, I move the window outside the screen and back again and it still doesn't update. The problem is that getPreferredSpan() is not called when it repaints.
    Thanks for your response. I will try to find out how to have the view's size recalculated when I insert content.

  • Adobe, please stop running from this issue! (GPU vs CPU anomalies / fades)

    Adobe,
    I have tried to bring this issue to light many times, and your own users have argued it ad finem, but to no avail! I am TIRED of getting terrible alpha blending (and opacity curve) results with GPU acceleration enabled, vs CPU. In fact, it is SO BAD that I NEVER work with GPU acceleration any more.
    Here is the issue:
    When GPU acceleration is enabled, you simply CANNOT do a smooth fade and/or cross dissolve. It appears to fade down smoothly to about 20% opacity, and then the next frame it will jump right to 0% quite abruptly and disappear. It's almost as if the fade simply gives up and switches off! Regardless of whether you use Cross Dissolve, or Film Dissolve the results are the same. Also, your alpha blending is all messed up, CLEARLY showing a different result when comparing CPU and GPU rendering outputs. Once again, this issue ONLY exists with GPU acceleration ENABLED. Switch off GPU/MPE and the problems disappear. But of course you lose the speed and other benefits GPU acceleration offers, which would be great to have! Especially seeing as I have also heard (from various other resources) that GPU acceleration can improve the quality of rendering out to compressed formats like H264. But we will never know that, will we? Because, every time I enable GPU, my fades and blending looks noticeably bad!
    I have seen in various other threads that your response has been along the lines of: "That's just the way it is". But unless your name is Bruce Hornsby, this response is unacceptable! You cannot advertise a "great feature" of your products (in this case, GPU/MPE), yet when people try to use it and see odd results, simply tell us: "oh by the way, yeah, it does not work in a few scenarios, like fading, but otherwise you are good to go!" The way I see it: cross-fades (even fades in general) as well as opacity/blending are some of the most common, if not THE most common techniques used in video projects! Having an anomaly of this nature showing a DISTINCT difference in quality output when one of your fantastic "features" is enabled is just poor form. What is evern poorer is your responses (or lack thereof) related to the issue. Especially seeing as this problem has been present since CS5, and now we are STILL seeing it in CC!
    Here is a thread which documents the issue well (even shows examples, and other details someone prepared for you to apparently ignore):
    http://forums.adobe.com/thread/773441
    ...it was never addressed there.
    Another issue which details it going back as far as CS 5.5:
    http://forums.adobe.com/thread/987306
    ...once again, never resolved.
    Now I am using CC, latest version, up-to-date, a fast i7 processor, a CUDA supported card, and all of those go to waste because I have to have GPU and the mercury playback engine disabled to yield decent quality results.
    I implore you, not just for myself, but on behalf of everybody here who has already addressed this issue, but has had their pleas fall on deaf ears: PLEASE FIX THIS PROBLEM. Telling us simply that: "This is the way GPU cards choose to render" is NOT ACCEPTABLE. It's just like me saying when I drive my car on the wrong side of the road: "that's just the way I drive!". Doesn't mean it is acceptable!
    You may have won people over since Final Cut Pro screwed the pooch with version X... but I can guarantee if this does not get resolved soon, the issue won't just be isolated to the forums here. Expect to read about it in MANY online publications that I am sure your competitors will ENJOY watching!
    Mat.

    Indeed. Yes Adobe, please explain.
    And here is an example of what I am talking about:
    CPU only (MPE and GPU DISABLED):
    This appears to be what I would consider accurate, as it is not only well blended, but the fades work smoothly thanks to it relying on the CPU...
    GPU (MPE and GPU ENABLED - Linear Color ON - as per default):
    This provides identical image quality/blending results as the CPU only benchmark. However, the fades are very abrupt, as per the original problem...
    GPU (MPE and GPU ENABLED - Linear Color OFF, as per your recommendation):
    This is your recommended solution. The fades are as smooth as they are in the CPU version. But as you can see the color, alpha and blending are VASTLY different. Actually, it looks HORRIBLE! The BG text is barely visible, and the foreground text appears to be more prevalent over the top of the back layer, making its fade-up quite disjointed and selective.
    ...So as you can see, the "solution" you provided seems to create more problems and/or inconsistencies in the overall output. Now we have no idea what is the "standard"!
    I personally find these inconsistency's very concerning. And I am sure I'm not the only one. Please tell me there is actually a logic to this "solution" and it wasn't a simple duct-tape fix that nobody there at Adobe actually looked deeper into to see exactly how it would effect overall image quality! It sure appears that way!
    I appreciate that you, Kevin, are not directly responsible for this issue, and you are indeed a representative trying to help. But please realize that for many of us here, we are LONG time Premiere users, with years of experience and influence in this industry, and this definitely isn't our first rodeo! When we flag these issues we do so out of a REAL need, which means the consequences Adobe faces as a result of not addressing these issues are equally as REAL! As such; I encourage you to expedite the process of resolving this issue, because it has been prevalent since CS5.5, and the fact that it is not been resolved and/or has been addressed poorly does not bode well for your overall reputation. Especially when you are trying to make Premiere the industry standard. Like I said, I would hate to have to look at alternatives, so give me a solution, because if I decide to move on from using Premiere, I won't be the last. And no, I am not being melodramatic here. If a piece of software cannot seem to get something as simple as fades and blend modes right (or at least CONSISTENT), how can the software be trusted to handle high-end workflows? Food for thought.
    Mat.

  • How to insert hyperlinks in RTF document shown in JEditorPane?

    This is a compound question so bear with me on this one :)
    What I need is to insert an hyperlink in a JEditorPane; Store it as RTF code; Retrieve it; Show it and click on it to go the the destination.
    1) So, first question, is there some method to automatically add the hyperlink and will it be saved in RTF with RTFEditorKit? (I'm actually using AdvancedRTFEditorKit but an answer to either will be enough)
    2) I tried a method that adds what appears as a link but the document that is stored doesn't have the necessary RTF codes, only the formatting that makes it look like a link. I also checked the actual RTF codes I'd need to add and they seem easy to do. So, is there a way to add the actual underlying RTF codes to the document while it's in the JEditorPane?
    I know the question(s) isn't too specific, if you can shed some light over the whole thing and point me in the right direction, it'd be great!

    Just a follow up to my own question. I found a way to answer my question 2) and I'm now storing the rtf code for hyperlinks. Now, when I show the document in JEditorPane with RTFEditorKit, I get the name of the hyperlink with no formatting indicating that it's a hyperlink.
    Example. The link "http://www.google.com" with the name "Google", only shows "Google" in plain text.
    Is it because the components I'm using don't support hyperlinks from RTF files even though they're supported from HTML files?
    Is there any way you can see this working? Is it possible to include something inside the JEditorPane that the user can click, instead of the hyperlink?

  • IPhone 5 voice call quality fade in and out. Noise Cancellation interference?

    I've been having this huge problem with the iPhone5. The evidence i've collected seems to indicate this is a problem with all iPhone5's.
    On calls in certain places both indoors and outdoors, the callers voices over the iPhone5 fade in and out. Their voices occasionally completely fade completely away, and only come back momentarily. The low volume for 50% of the time forces me to raise the volume, but raising the volume does not help because when the voice does come back, the volume is too loud for my ears.
    I went back to the Apple store and they are not able to help me. They suggested a clean restore, which I did. They offered to replace the phone, which I did, but it is the same problem.
    - iPhone 5 vs. iPhone 4S, the fading does not occur. I make the call to the same voice mail system I have, and the sounds from the other side are consistently the same volume for the 4S, but fades in and out for the 5.
    - I connected up a 8mm jack between my iPhone 5 and my mac in an attempt to record this problem. In that instance, the sounds from the voice mail DO NOT fade in and out. I did find out that the dynamic range on the iPhone 5 is MUCH greater than that of the iPhone 4S, for some strange reason.
    - When I hold the phone up to my ear, the fading in and out does occur, but it is less noticeable. But it's still there.
    - When I leave my work area the problem goes away. However, because the iPhone 4S on the same AT&T service does not have this problem, this leads me to believe it's NOT a lack of transmission power from the AT&T cell tower. Rather, it is a reception issue at the iPhone5 side.
    - I turned off LTE, data and then made the calls. Same issue.
    I use this phone to make 60 minute calls for conference calls frequently. I cannot use it. Please advise. I am seriously considering returning this phone. Except i've sold my old iPhone 4 already. I'm in a bad place. Please help.
    Here's another post of a fellow with the same exact problem.
    http://forums.macrumors.com/showthread.php?t=1456404
    Apple, please look into this. I believe this is a problem with the noise cancellation software.

    I've got an update on this problem with fading volume. I've isolated it to the set volume on the phone for voice calls when using headphones. When the headphone volume is set between 1 and 6 (out of 16 squares) the callers volume will consistently fade in and out. The fading which is normal to zero volume at 2-5 Hz is serious enough that normal conversation is impossible.  When the volume is raised above 6/16 then the callers voice stabilize and I can hear all their words again. Unfortunately, at 6/16 volume their voices are too loud for the headphones.
    Furthermore, when headphones are plugged in, and I initial a call after the iphone5 was idle for several minutes, the first dial tone has preceded by a very loud pop an the tone, as though there was too much pressure (charge) that was dissipated all at once.
    Other details:
    - I used 3 different earphones, iPhone 4 headphones, altec earphones, an the new iPhone 5 earbuds. Same.
    - I turned on and off lte, data, Bluetooth, wifi. Problem persists unaffected.
    - when switching to iPhones earpiece and mic, the fading is gone.
    - I have 3 out of 5 bars where I teste this, in the city outside and on hwy 5 in central California. Same symptoms in all places I've tested.
    - I have exchanged my phone at the apple store. Same issue with both iPhones an I suspect all ipjone5s.
    - the ipjone4s does NOT have this problem when the volume is set lower. I can tell that the iPhone 5 must have a new audio filter to make the sounds have larger dynamic range. I liked the 4s better, because it is easier on the ears!

  • HTML file is not being shown properly in the JEditorPane

    Hi,
    I am using JEditorPane to display an HTML file from the local disk. This HTML file contains the html tables. Now when this file is getting displayed in the JEditorPane, one top row grid is not being displayed in the editor pane. content of the row is there...but the column grid is missing. All other rows and columns are being shown but the first row-column grid which contains the heading for column.
    Also when I m printing the content of this JEditorPane using Java Print API then no grid is being printed on the paper. content is coming properly but no table grids. when i have taken the print out of the original html file from the browser then table grids are being printed out properly.
    Please do help me out in showing the HTML file in the JEditorPane properly and printing the same.
    Many Thanks,
    gshankar

    Hi,
    JEditorPane renders HTML with many limitations.
    You can use JDIC for the same. refer: jdic.dev.java.net
    But JDIC does not work on windows 98.
    Anand

  • Highlighting text in JEditorPane using HTMLEditorPane

    I am using JEditorPane extending HTMLEditorkit. In the HTMLEditorkit when we use the span tag for highlighting the text of a line, it is just not showing it. It starts the color and ends it there and then. It looks like a small dot and doesnot spans the whole line.
    Is this a bug or something in JAVA 1.3.1. If anyone of you knows how to do it please let me know.
    I need it for a project which has a deadline.
    Thanks.

    JEditorPane is not rendering and HTMLDocument.HTMLReader is not reading the SPAN tag. In other words, the SPAN tag is not supported in Java. You can still use it by overriding the mentioned classes. My application SimplyHTML gives an example of how this can be done. Please visit http://www.lightdev.com/dev/sh.htm
    Ulrich

  • My iphone 5 won't unlock and the screen fades to black.

    My iphone 5 won't unlock and the screen fades to black. I can't answer calls or texts. help!

    Hard Reset
    Press and hold BOTH the Sleep/Wake button & the Home button until you see the Apple logo on the screen.
    Peace, Clyde

  • How to modify text insertion position in HTML in a JEditorPane

    Hi all,
    Thanks in advance if anyone knows the type of code I need to look at to solve my problem.
    It involves the insertion point (in the actual HTML) when editing text in a JEditorPane using type html/txt.
    for example, lets say you start to add text by typing in a JEditorPane which already contains some text.
    The html is:
    <html><head></head>
    <body>
    <span>inside</span>
    </body>
    </html>
    which represents visually:
    inside
    The user places the caret (by pointing and clicking the mouse) after the word 'inside'.
    The user types the word 'outside'.
    The resulting html will look like this:
    <html><head></head>
    <body>
    <span>insideoutside</span>
    </body>
    </html>
    I would very much prefer it to look like this:
    <html><head></head>
    <body>
    <span>inside</span>outside
    </body>
    </html>
    Does anyone know how to influence the position of insertion in this way?
    Thanks again,
    sean

    Success!!!
    In a tiny bit of a hacky way.
    I will share my path to success. Though I am sure it could be improved. The solution (except for the minor hack to get it to work at all) is quite simple.
    And it did indeed involve the use of the DocumentFilter.
    So, to recap, My objective was to prevent the user from causing the addition of text within a certain span tag in my HTML when editing visual through a JEditorPane.
    Specifically, in my HTML I have a number of span tags identified through a type attribute. My span tags look like this:
    <span type="reserved">hello</span>
    I wanted to prevent the user from being able to type (visually) to cause either this:
    <span type="reserved">next text hello</span>
    or
    <span type="reserved">hello new text</span>
    or
    <span type="reserved">he new text llo</span>
    Initially, I had used a Caret listener, and moved the caret along, which, besides being hugely ugly, wouldn't fix the main problem of, even when the user starts typing after the word 'hello' on the visual pane, the text would be appended within the span tag, and not outside. Even though if I were to check my position (with the following code) I would be told it wasn't associated with the span attribute at all
              Element elem = hdoc.getCharacterElement(pos);
              AttributeSet a = elem.getAttributes();
              AttributeSet spanAttributeSet = (AttributeSet)a.getAttribute(HTML.Tag.SPAN);
              // if spanAttributeSet is not null, then we properly found ' a span '.
              // now we need to discover if it is one of OUR spans
              if (spanAttributeSet != null)
                    { // blah .... do something
                    }Regardless of what it told me with the above code, if i were to type in at that position (just after the hello) it would be added to the span tag. Which is what I didn't want.
    But the discovery of the DocumentFilter was what I needed to look at. Although, I had a very strange problem of having to reassign the document filter several times to the editorPane (later checks would see it as null). I don't know why I have this problem, but I have made a work-around by ensuring the DocumentFilter is still assigned by reassigning it every time the user moves the caret in the editorpane. Not nice, but prevents my filter from being ignored.
    The real solution:
    Using the DocumentFilter, I was able to solve both my problems of , not allowing the user to type inside the word 'hello', and preventing the text typed after the 'hello' being appended inside the span tag by the Document model.
    This is my code:
               myFilter = new DocumentFilter(){
                    public void insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attrs) throws BadLocationException
                         System.out.println("in insert string");
                           if (isCaretOnReservedObject((HTMLDocument)fb.getDocument(), offset))
                                throw new BadLocationException("Reserved position", offset);
                           else
                                    Object val = attrs.getAttribute(HTML.Attribute.TYPE);
                                if (val!=null && val.equals("reserved"))
                                     super.insertString(fb, offset, string, null);
                                else
                                     super.insertString(fb, offset, string, attrs);
                    @Override
                    public void remove(DocumentFilter.FilterBypass fb,
                            int offset,
                            int length)
                     throws BadLocationException
                         super.remove(fb, offset, length);
                      public void replace(DocumentFilter.FilterBypass fb,
                             int offset,
                             int length,
                             String text,
                             AttributeSet attrs)
                      throws BadLocationException
                           if (isCaretOnReservedObject((HTMLDocument)fb.getDocument(), offset))
                                throw new BadLocationException("Reserved position", offset);
                           else
                                    Object val = attrs.getAttribute(HTML.Attribute.TYPE);
                                if (val!=null && val.equals("reserved"))
                                     super.replace(fb, offset, length, text, null);
                                else
                                     super.replace(fb, offset, length, text, attrs);
               ((AbstractDocument)this.getInternalJEditorPane().getDocument()).setDocumentFilter(myFilter);
         protected boolean isCaretOnReservedObject(HTMLDocument hdoc, int pos)
              boolean retval = false;
              Element elem = hdoc.getCharacterElement(pos);
              AttributeSet a = elem.getAttributes();
              AttributeSet spanAttributeSet = (AttributeSet)a.getAttribute(HTML.Tag.SPAN);
              // if spanAttributeSet is not null, then we properly found ' a span '.
              // now we need to discover if it is one of OUR spans
              if (spanAttributeSet != null)
                   Object type = spanAttributeSet.getAttribute(HTML.Attribute.TYPE);
                   if (type != null && type.equals("reserved"))
                        // for our logging, we get the ref, which holds the source
                        // of our value later
                        System.out.println(elem + ": the value is: " + spanAttributeSet.getAttribute("ref"));
                        retval = true;
              return retval;
         }And now, when I attempt to type on the word 'hello', nothing happens (great!), and when I type after it, it is not assigned the span tag attribute, and we later find it (when outputting html) at the outside of the span tag.
    I don't know if there is a better way to do this, but it looks and works fairly cleanly so far.
    And thanks to stas for your reply...... Maybe this is what you meant. . it certainly was the attributes I needed to fiddle with here, and it gave me an extra hint of what to look for when researching the problem.
    Edited by: svaens on Sep 28, 2009 6:56 PM
    forgot to add dependency to code snippet
    Edited by: svaens on Sep 28, 2009 9:34 PM
    fix bug

  • Stereo Fader Missing in LPX Arrange Window

    I've imported a project from LP9 and noticed that there is no Stereo output fader in the arrange window in LPX, it was there in LP9..
    So I create a "new" audio track and LPX generated Ch 81 (my mixer has 80 channels).  I selected "reassign track" to "Output Stereo -->Output 1-2" but I needed to toggle the automation button to see the automation already on that track (from my LP9 session).
    When I go to the environment to delete the redundant Ch 81, the Stereo output fader / track  in the arrange window disappears again.
    I repeat the process, and this time I leave Ch 81 intact and save the session.  When I reload the session, the stereo output fader is GONE. The automation still works but I cannot edit or see it...
    Why does Logic X not display the output fader assigned in the mixer?

    I've imported a project from LP9 and noticed that there is no Stereo output fader in the arrange window in LPX, it was there in LP9..
    So I create a "new" audio track and LPX generated Ch 81 (my mixer has 80 channels).  I selected "reassign track" to "Output Stereo -->Output 1-2" but I needed to toggle the automation button to see the automation already on that track (from my LP9 session).
    When I go to the environment to delete the redundant Ch 81, the Stereo output fader / track  in the arrange window disappears again.
    I repeat the process, and this time I leave Ch 81 intact and save the session.  When I reload the session, the stereo output fader is GONE. The automation still works but I cannot edit or see it...
    Why does Logic X not display the output fader assigned in the mixer?

  • Hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    hi all.When pressed play and make some changes in loop (eg fade in fade out) are very slow to implement, and also the loops from the library are very slow to play, corrects the somewhat self so is the Logic??

    Hey there Logic Pro21,
    It sounds like you are seeing some odd performance issues with Logic Pro X. I recommend these troubleshooting steps specifically from the following article to help troubleshoot what is happening:
    Logic Pro X: Troubleshooting basics
    http://support.apple.com/kb/HT5859
    Verify that your computer meets the system requirements for Logic Pro X
    See Logic Pro X Technical Specifications.
    Test using the computer's built-in audio hardware
    If you use external audio hardware, try setting Logic Pro X to use the built-in audio hardware on your computer. Choose Logic Pro X > Preferences > Audio from the main menu and click the Devices tab. Choose the built in audio hardware from the Input Device and Output Device pop-up menus. If the issue is resolved using built-in audio, refer to the manufacturer of your audio interface.
    Start Logic with a different project template
    Sometimes project files can become damaged, causing unexpected behavior in Logic. If you use a template, damage to the template can cause unexpected results with any project subsequently created from it. To create a completely fresh project choose File > New from Template and select Empty Project in the template selector window. Test to see if the issue is resolved in the new project.
    Sometimes, issues with the data in a project can be repaired. Open an affected project and open the Project Information window with the Project Information key command. Click Reorganize Memory to attempt to repair the project. When you reorganize memory, the current project is checked for any signs of damage, structural problems, and unused blocks. If any unused blocks are found, you will be able to remove these, and repair the project. Project memory is also reorganized automatically after saving or opening a project.
    Delete the user preferences
    You can resolve many issues by restoring Logic Pro X back to its original settings. This will not impact your media files. To reset your Logic Pro X user preference settings to their original state, do the following:
    In the Finder, choose Go to Folder from the Go menu.
    Type ~/Library/Preferences in the "Go to the folder" field.
    Press the Go button.
    Remove the com.apple.logic10.plist file from the Preferences folder. Note that if you have programmed any custom key commands, this will reset them to the defaults. You may wish to export your custom key command as a preset before performing this step. See the Logic Pro X User Manual for details on how to do this. If you are having trouble with a control surface in Logic Pro X, then you may also wish to delete the com.apple.logic.pro.cs file from the preferences folder.
    If you have upgraded from an earlier version of Logic Pro, you should also remove~/Library/Preferences/Logic/com.apple.logic.pro.
    Restart the computer.
    Isolate an issue by using another user account
    For more information see Isolating an issue by using another user account.
    Reinstall Logic Pro X
    Another approach you might consider is reinstalling Logic Pro X. To do this effectively, you need to remove the application, then reinstall Logic Pro X. You don't have to remove everything that was installed with Logic Pro X. Follow the steps below to completely reinstall a fresh copy of Logic Pro X.
    In the Finder, choose Applications from the Go menu.
    Locate the Logic Pro X application and drag it to the trash.
    Open the Mac App Store
    Click the Purchases button in the Mac App Store toolbar.
    Sign in to the Mac App Store using the Apple ID you first used to purchase Logic Pro X.
    Look for Logic Pro X in the list of purchased applications in the App Store. If you don't see Logic Pro X in the list, make sure it's not hidden. See Mac App Store: Hiding and unhiding purchases for more information.
    Click Install to download and install Logic Pro X.
    Thank you for using Apple Support Communities.
    Cheers,
    Sterling

  • Face time fades out and then tries to reconnect on new ipad retina display on WiFi.  Iphone 4s has no problem with face time from exact same location and same contact.  WiFi signal strong on both devices.  What gives?

    Face time fades out and then retries to connect (new Ipad Retina Display) on WiFi. Iphone 4s has no problem with face time from same location and same contact.  What gives?

    rdallas001 wrote:
    Is the router to small?
    Not necessarily, if you are using Facetime all the data goes through your WiFi router, your cable/DSL modem, your ISP and the internet to Apple's Facetime servers and then, in reverse, down to the Facetime recipient. If your ISP connection is too slow or there is excessive traffic on the internet you can have Facetime problems.
    Most WiFi routers can handle this unless others in the house are also using WiFi at the same time. The problem may be your ISP connection or congestion on the internet, etc.

  • How can an applet retrieve the values of a HTML form shown in a JEditorPane

    Hi,
    I'm doing an applet that contains a JTree and a JEditorPane
    among other components. Each node of the JTree represents some
    information that is stored in a database, and whenever a JTree
    node is selected, this information is recovered and shown in
    the JEditorPane with a html form. To make the html form,
    the applet calls a servlet, which retrieves the information of
    the node selected from the database. This information is stored
    like a XML string, and using XSLT, the servlet sends the html
    form to the applet, which shows it in the JEditorPane.
    My problem is that I don't know how I can recover new values
    that a user of the application can introduce in the input fields
    of the html form. I need to recover this new values and send them
    to another servlet which store the information in the database.
    If someone could help me I'd be very pleased.
    Eduardo

    At least I found a fantastic example. Here it is:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import java.net.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.text.html.*;
    public class FormSubmission extends JApplet {
    private final static String FORM_TEXT = "<html><head></head><body><h1>Formulario</h1>"
    + "<form action=\"\" method=\"get\"><table><tr><td>Nombre:</td>"
    + "<td><input name=\"Nombre\" type=\"text\" value=\"James T.\"></td>"
    + "</tr><tr><td>Apellido:</td>"
    + "<td><input name=\"Apellido\" type=\"text\" value=\"Kirk\"></td>"
    + "</tr><tr><td>Cargo:</td>"
    + "<td><select name=\"Cargo\"><option>Captain<option>Comandante<option>General</select></td>"
    + "</tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" value=\"Enviar\"></td>"
    + "</tr></table></form></body></html>";
    protected HashMap radioGroups = new HashMap();
    private Vector v = new Vector();
    public FormSubmission() {
    getContentPane().setLayout(new BorderLayout());
    JEditorPane editorPane = new JEditorPane();
    editorPane.setEditable(false);
    editorPane.setEditorKit(new HTMLEditorKit()
    public ViewFactory getViewFactory() {
    return new HTMLEditorKit.HTMLFactory() {
    public View create(Element elem) {
    Object o = elem.getAttributes().getAttribute(javax.swing.text.StyleConstants.NameAttribute);
    if (o instanceof HTML.Tag)
    HTML.Tag kind = (HTML.Tag) o;
    if (kind == HTML.Tag.INPUT || kind == HTML.Tag.SELECT || kind == HTML.Tag.TEXTAREA)
    return new FormView(elem)
    protected void submitData(String data)
    showData(data);
    protected void imageSubmit(String data)
    showData(data);
    // Workaround f�r Bug #4529702
    protected Component createComponent()
    if (getElement().getName().equals("input") &&
    getElement().getAttributes().getAttribute(HTML.Attribute.TYPE).equals("radio"))
    String name = (String) getElement().getAttributes().getAttribute(HTML.Attribute.NAME);
    if (radioGroups.get(name) == null)
    radioGroups.put(name, new ButtonGroup());
    ((JToggleButton.ToggleButtonModel) getElement().getAttributes().getAttribute(StyleConstants.ModelAttribute)).setGroup((ButtonGroup) radioGroups.get(name));
    JComponent comp = (JComponent) super.createComponent();
    // Peque�a mejora visual
    comp.setOpaque(false);
    return comp;
    return super.create(elem);
    //editorPane.setText(FORM_TEXT);
    editorPane.setText(texto);
    getContentPane().add(new JScrollPane(editorPane), BorderLayout.CENTER);
    private void showData(String data) {
         // ergebnis significa resultado
    StringBuffer ergebnis = new StringBuffer("");
    StringTokenizer st = new StringTokenizer(data, "&");
    while (st.hasMoreTokens()) {
    String token = st.nextToken();
    String key = URLDecoder.decode(token.substring(0, token.indexOf("=")));
    String value = URLDecoder.decode(token.substring(token.indexOf("=")+1,token.length()));
    v.add(value);
    ergebnis.append(" "); ergebnis.append(key); ergebnis.append(": "); ergebnis.append(value); ergebnis.append(" ");
    ergebnis.append(" ");
    JOptionPane.showMessageDialog(this, ergebnis.toString());
    public static void main(String[] args) throws Exception {
    JFrame frame = new JFrame ();
    FormSubmission editor = new FormSubmission ();
    frame.getContentPane().add(editor);
    frame.pack();
    frame.show();
    }

  • How can I create JEditorPane which scrolls to the bottom on every resize?

    JRE 1.3.0
    Included a simple frame with the only control - JEditorPane (contained within JScrollPane). Every time scroll pane size changes, attempt to scroll down to the end of JEditorPane is made.
    The problem is: although everything works 9 times of 10, sometimes editor is scrolled almost to the end, sometimes - to the very top. On the next resize editor is scrolled correctly.
    I think, there are some delayed layout recalculations inside SWING which prevent JEditorPane and/or JScrollPane from knowing actual size.
    Is it possible to force JEditorPane+JScrollPane pair to update dimensions? ( explicit call to doLayout() does not fix anything )
    Thanks
    public class TestFrame extends JFrame
    BorderLayout borderLayout1 = new BorderLayout();
    JScrollPane jScrollPane1 = new JScrollPane();
    JEditorPane jEditorPane1 = new JEditorPane();
    public TestFrame()
    try
    jbInit();
    catch(Exception e)
    e.printStackTrace();
    private void jbInit() throws Exception
    this.getContentPane().setLayout(borderLayout1);
    jEditorPane1.setContentType("text/html");
    jEditorPane1.setText("test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test ");
    jScrollPane1.addComponentListener(new java.awt.event.ComponentAdapter()
    public void componentResized(ComponentEvent e)
    jScrollPane1_componentResized(e);
    this.getContentPane().add(jScrollPane1, BorderLayout.CENTER);
    jScrollPane1.getViewport().add(jEditorPane1, null);
    void jScrollPane1_componentResized(ComponentEvent e)
    Dimension size = jEditorPane1.getPreferredSize();
    jEditorPane1.scrollRectToVisible( new Rectangle(0, size.height, 0, 0) );
    System.out.println("preferred height=" + size.height);
    }

    Seen this thread?
    Return to previously viewed page

Maybe you are looking for

  • Error while running OracletoFile

    Hi, I want to unload data oracle table to flat file. But it gives me an error... I am using ODI_11.1.1.5.0 and OS win7 64 bit. I declared FILE phsycal schema and its director like this : F:\temp and logical schema log_file. I created a file model fol

  • AT SELECTION SCREEN event in Background

    HI experts, In my selection screen i have a parameter P_LAYOUT. If i execute my program in background, the P_LAYOUT is obligatory and if it is blank, i should get an error message on the screen prompting the user to fill the P_LAYOUT. My code is as f

  • Flash movie interactive

    Hello, I imported a Flash movie (created in 8, saved in 6 to work with Captivate). It's a graphic of an engine with a list of engine parts on the left. The student needs to drag the engine part name to the engine part in the graphic. My question is:

  • How to I downgrade from 20GB to 5 FREE option in iCloud ?

    how do I downgrade iCloud storage option to 5GB free.  The all locks out the DONE button when choosing a new option.  Help!

  • Executable d'une application à plusieurs vi

    Bonjour, J'ai une application à trois VIs : le programme principale qui va lancer les deux autres et les piloter (main), le vi qui fait les acquisitions (ACQ), et un autre qui les enregistre (LOG). Mon application fonctionne très bien en mode édition