Strangeness Using HTML with JTabbedPane

I'm getting some weird behavior when using html format for a JTabbedPane. It seems when I create tabs using HTML, it works fine, but when I subsequently try to change the tab title using JTabbedPane.setTitleAt(), the title doesn't change. The title doesn't change only when I create it with html. If I use "normal" text, the title changes fine.
I imagine JTabbedPane has a problem with html. I am using version 1.3 and compiling with JBuilder. Below is an example of my program. Uncomment mentioned lines to see it react strangely.
Any help would be appreciated.
-joel
package junk;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class BugExample extends JFrame {
BugExample() {
super( "Bug Example" );
JTabbedPane tabs = new JTabbedPane();
JPanel aPan= new JPanel();
//html for tab index 0
tabs.addTab("<html><center><font face=\"Dialog\" size = -1><b>Rate 1: " +
"<font color=#008040>5.6%</b></font></font></center></html>", new JPanel());
//"Normal" text for tab index 0. If I use this, then the setTitleAt works
// properly. To try this, make sure the previous addTab() is commented out
// tabs.addTab("Rate 1:5.7%", new JPanel());
//html for tab index 1
tabs.addTab("<html><center><font face=\"Dialog\" size = -1><b>Rate 2: " +
"<font color=#008040>9.2%</b></font></font></center></html>", new JPanel());
getContentPane().add(tabs);
//Uncomment next line and run again using the html style addTab() for index 0.
// I would think the tab at index 0 would show this new text
// In fact, it will if I do not use html for index 1.
// tabs.setTitleAt(0, "Rate it again");
setSize( 400, 220 );
public static void main(String[] args) {
BugExample frame = new BugExample();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
     System.exit(0);
System.err.println("Starting");
frame.setVisible(true);

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class BugExample extends JFrame {
BugExample() {
super( "Bug Example" );
JTabbedPane tabs = new JTabbedPane();
JPanel aPan= new JPanel();
//html for tab index 0
tabs.addTab("<html><center><font face=\"Dialog\" size = -1><b>Rate 1: <font color=#008040>5.6%</b></font></font></center></html>", new JPanel());
//"Normal" text for tab index 0. If I use this, then the setTitleAt works
// properly. To try this, make sure the previous addTab() is commented out
// tabs.addTab("Rate 1:5.7%", new JPanel());
//html for tab index 1
tabs.addTab("<html><center><font face=\"Dialog\" size = -1><b>Rate 2: <font color=#008040>9.2%</b></font></font></center></html>", new JPanel());
getContentPane().add(tabs);
//Uncomment next line and run again using the html style addTab() for index 0.
// I would think the tab at index 0 would show this new text
// In fact, it will if I do not use html for index 1.
tabs.setTitleAt(0, "Rate it again");
setSize( 400, 220 );
public static void main(String[] args) {
BugExample frame = new BugExample();
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
System.exit(0);
System.err.println("Starting");
frame.setVisible(true);

Similar Messages

  • JTextArea HTML with embedded JTabbedPane

    I need a JTextArea to display HTML with an embedded JTabbedPane.
    From a high level, it should look as follows:
    HTML
    JTabbedPane
    HTML
    I basically want to nest the JTabbedPane into HTML above and below it.
    Any ideas?

    Hi Grok,
    I suggest using a JTextPane. JTextPane can handle HTML and you can also embed components into it.
    Good Luck,
    Avi.

  • Using colspan with nested html tables

    Please see my question on stackoverflow at:
    using colspan with nested html tables - Stack Overflow

    You should be posting in the Dreamweaver forum.  This is not a design
    question as such is it? Dreamweaver forum is the most busiest forum on
    Adobe portal and you are very likely to get the response and a solution
    almost quickly.
    <https://forums.adobe.com/community/dreamweaver>
    Good luck.

  • How Can i use Html frames with  simple JSP???

    How Can i use Html frames with simple JSP???
    Actually i am creating an application in which i have used Index.html as frame.
    Noew i am trying that if i click on a link of one frame(say menu frame) the \result shoul come to some other frame(say frame named mainwindow).
    Hoe can i do like this???
    Anand Pritam

    Well i am using..
    < Base target="mainwindow">
    But it is no working is there some other way??

  • How To  use fckeditor HTML with  flex

    I am using coldfusion server technlogy.
    I am trying make demo site Flex with coldfusion.
    I want to know how to use html code with my mxml application.
    Privious i am using FCK TEXT editor with my HTML File
    Currently flex have small text editor But i need full text
    editor with all feture which include FCK Editor
    Please let me know how to integrate Fck Editor with flex
    application . Or any html file with Flex Application

    Flex has a very limited support for HTML, thus you cannot
    create a full featured editor within flex. The only work arounds I
    have seen are done using IFRAME's over your app.
    Not sure if it an option, however Apollo does a good job of
    addressing this issue by allowing full feature Javascript and HTML.
    Allen

  • In FF4.0.1 problem with using HTML creator in WebCT. WHY? Not a problem in FF4.0.0

    In FF4.0.1 problem with using HTML creator in WebCT. WHY? Not a problem in FF4.0.0

    Hi Shane,
    I passed through all the described problems in the list, and after doing several tests the error that you described is always present if the "jpcsclite_en_US.properties" is not present in the same place of the "jpcsclite.properties". I really don't know the reason, I just copied and pasted the same file, renamed the copy and the error was gone... though both of them include the line where the .dll is found!
    That's how it worked for me, but if anybody knows how it works without that dirty trick, it would be good.
    Regards,
    Leandro
    PS: Just in case that somebody is using the version JCSDK3.0, I did not find the .dll in that version, but in the JCSDK2.2.2 *(:-S)*

  • Ever seen this error message? You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only.

    Trying to load this site
    http://southcarolina.247sports.com/
    and it redirects me to this address
    http://media.247sports.com/Oops.html?aspxerrorpath=/
    and gives me the error message. "You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only. "
    Thanks for your help

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • I'm often having issues with clients not seeing or being able to open attachments, font formatting changes (on the pc end) and the inability to use HTML signatures to promote our company brand.

    I'm often having issues with clients not seeing or being able to open attachments, font formatting changes (on the pc end) and the inability to use HTML signatures to promote our company brand.

    I imagine your clients must be using Outlook, which is seriously broken when it comes to e-mail standards, especially HTML e-mail. You can work around the issues with Outlook by only sending plain-text e-mails and making sure that, in the Edit -> Attachments menu, the last two options are checked. Unfortunately, that means that HTML signatures are out.
    If you need something with a fancy layout, either attach a PDF file to the e-mail or include a link to a website in the e-mail.

  • I built a website for a customer using HTML only, so it would work on everything, but some of the text numbers are not clear on the ipad. It works perfectly on all the other browsers.

    I built a website for a customer using HTML only, so it would work on any browser, and it works perfectly on everything except ipad safari. I'm loosing information with most of my text numbers - instead of being black they are displaying a 'ghost' image (white) of the numbers.
    Is this a memory issue, or cache issue, or something else?  I've downloaded iCab and the site works perfectly with it.
    Also wondering if I can manually reload/refresh web pages in iPad Safari.
    Since most people with iPads will use Safari rather than iCab, I have to tweak this site to work in Safari.

    Detecting phone numbers and making them clickable is a feature of the browser, and rebuilding your web-site links will not make any difference. Its done when the page is shown in the browser, not when the page is created.
    According to the Safari iOS developers guide, you can turn these data detectors off using this code:
    <meta name = "format-detection" content = "telephone=no">
    http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Referen ce/Articles/PhoneLinks.html

  • I installed 5 but now I can't use it with Mac osx - how do I go back to my old version?!

    I was prompted to install Firefox 5 on my Mac. Now when I try to open it says I can't use Firefox with osx. How do I go back to using the previous version - has it been written over? My previous version was fine!

    Firefox 4 requires at least OS X 10.5 and an Intel Mac. There is a third party version of Firefox 4 that runs on OS X 10.4/10.5 and PPC Macs, for details see http://www.floodgap.com/software/tenfourfox
    If you prefer, you can get the latest version of Firefox 3.6 from http://www.mozilla.com/en-US/firefox/all-older.html
    Mozilla are working to prevent Mac users with non-compatible systems from getting the notification about Firefox 4, and also not displaying the "Download Firefox 4" button on http://www.mozilla.com

  • How can I keep My 2 email accounts and all other using HTML? It only lasts temporarily, i.e. for the day...

    (1) - when I open Firefox I recently have clicked on the hyperlink for HTML at the bottom of page, it works great for my gmail and yahoo accounts. However, it is not a permanent fix, as it apparently lasts just for the daily session. How can I keep my internet, et al. HTML permanently?
    (2) - Firefox v24.0 is said to be fast and faster! However, I am not finding it so. when I click on a link or open a tab, it is frustrating as the tab labors too long to open...I more than not click on reload, which appears to help somewhat. Any suggestions?
    (3) - I've just printed out the Mozilla Support Q&A on the error message from Firefox stating that it cannot load the website...how to I remedy this, as it occurs constantly with my Yahoo mail login?
    (4) Finally, several weeks ago I inadvertently popped the "HEALTH" Bookmark (I have a Bookmarks Toolbar), which is excellent (had it with WinXP also, now with Win7), but I seem to pop, double click, or something or other, that makes a bookmark folder jump into the wild blue yonder! I've posted for answers here and elsewhere, printed out and read all variable instructions to navigate and locate, all to no avail. More sage advice please?
    with appreciation and, thanks in advance.

    For #1, is the link to use HTML to simplify the interface?
    It may be that the site stores your preference in a cookie, and you might have set Firefox to delete the cookie when you exit the browser. There are a few built-in ways to do this:
    * Set Firefox to "Keep [cookies] until: I close Firefox" on the Privacy Options (you can create an exception for your mail sites)
    * Set Firefox to "Clear history when Firefox closes" on the Privacy Options
    * Use a private browsing window to visit your mail site
    It's also possible that add-ons or external software may clean out cookies, or that there is a problem with the database file Firefox uses the store cookies.
    For #2, did this problem just start recently? Do you notice any relationship with the type of site content (e.g., pages that use Flash or other media)?

  • How to use MfE with Yahoo Small Business e-mail ac...

    Hi,
    I am using N97, and trying to access MfE with my company's e-mail id. We have taken e-mail id from Yahoo Small Business. 
    My question is
    1. Is it possible to access Yahoo Small Business's e-mail on my N97 using MfE (I am using it with normal Mailbox option in phone).
    2. If we can use what is the server name which I need to use for this application (It is not accepting pop.bizmail.yahoo.com).
    Please help me out.
    Regards
    Akshara
    N97 Black India
    Attending Nokia Discussion has become new hobby, Thanks to Nokia... for having so many bugs

    Maybe this can help you out.
    http://help.yahoo.com/l/us/yahoo/smallbusiness/bizmail/pop/pop-33.html
    ‡Thank you for hitting the Blue/Green Star button‡
    N8-00 RM 596 V:111.030.0609; E71-1(05) RM 346 V: 500.21.009

  • How to use HTML Video for iPad in iWeb

    I agree with all the advantages of HTML Video. How do you use html video on your iweb site?
    I want my iWeb site video to be viewable on iPads.
    I have learned the technique to use the HTML Snippet tool in iWeb to successfully post Flash video. I created all of my animations using Kenote's keyframe ability and have exported them to Quicktime and then have converted them into flash with Vertical Moon's Video to SWF. Then simply upload the SWF file to a folder on your idisk, then use the Flash Video insert HTML Snippet and insert the idisk url of the SWF file and you are done. What is the technique for HTML Video?
    I have found some HTML video encoders, here are the links:
    http://www.projekktor.com/ the technique is not clear to me and appears complicated.
    http://www.brightcove.com/en/ this one is way too expensive at $99 a month.
    http://jilion.com/sublime/video this one looks great but is not yet available and I am guessing it is a converter that will make your iMovie Quicktime into HTML Video.
    I have all of the i-Apps and Final Cut Express (2 revs out of date). Can I get the proper HTML video file from these programs, unless I am missing something I don't think so.
    Most people do not believe I made my site completely with Keynote and iWeb but here it is. http//www.falcon-pacific.com
    Thank You Very Much for considering my question. I will put the results on my iWeb site and the exact procedure and acknowledge all the sources of the solution.

    I want my iWeb site video to be viewable on iPads.
    Your videos ARE viewable on a iPad. No need for explicit HTML video coding.
    If you export your movies to iPhone that's all there is to do. You can do it in QT Pro/iMovie
    And HTML Video is a HTML code, not the movie itself :
    <video width="480" height="270" src="movie.m4v" controls></video>
    I use the iPad simulator in the SDK :
    http://developer.apple.com/ipad/sdk/
    Here's the result :
    http://ipad.dailynews.webege.com
    My blog : [html5 video|http://www.wyodor.net/blog/archives/2009/06/entry_181.html]
    And some links in my post in this topic : [HTML 5 in IWEB|http://discussions.apple.com/thread.jspa?threadID=2404927&tstart=30]

  • How to Use Gmail With Apple's Mail?

    Answer:
    Now Itis not a Problem, Please go to this link and know how to solve this problem, Ihave configuir this in my mac pro. Have enjoy.
    http://picturemuseum.blogspot.com/2011/08/how-to-use-gmail-with-apple-mail.html
    http://mobilesuggestion.blogspot.com/2011/08/how-to-use-gmail-with-apples-mail.h tml

    I notice that it's possible to have sticky posts in these forums. See
    http://forum.java.sun.com/forum.jspa?forumID=534
    the Concurrency forum for an example. Posting a link to the FAQ in a sticky post might reduce the number of FAQs asked here by maybe 1%? Or posts like this one might do well as a sticky?

  • Error while using RSCRM_BAPI with remote cubes

    Hi,
       We are getting short dump while trying to use RSCRM_BAPI with hierarchies i.e.display hierarchies to extract data to a flat file.
    We do get a warning that display hierachies are not longer supported in 2004s with RSCRM_BAPI and have been going on and on with SAP development.  They are saying we need to find alternatives.
    I wanted to know if anybody has tried using display hierarchies with RSCRM_BAPI in 2004s if not then I would like to know what are my options in getting a flat hierarchy report on to a flat file? 
    I dont think infospoke supports flat hierarchy extracts as infoproviders dont store hierarchy information.
    Thanks

    Heres my thought -
    to use Bex Broadcaster to download the information,am not sure if RSCRM_BAPI is replaced by new functionality ,might wait for SAP to confirm.
    <b>Key capabilities:-</b>
    1)The right information:Based on BExqueries, views, workbooks, Web applications & enterprise reports
    2)In different formats:HTML, MHTML, PDF, ZIP, printer formats, online links, SAP alerts…
    3)To the right people:e.g., single users, groups, distribution lists, user-specific or role-specific (incl. non-SAP users)
    4)In different channels:e-mail, Portal, BExPortfolio (unified access based on Knowledge Management folders), collaboration rooms, Universal Work List…
    At the right time:event driven, exception driven, ad-hoc, scheduled
    Bex Broadcaster + Information Broadcasting
    Note 760775 - Settings for Information Broadcasting
    Functions of Bex broadcaster
    http://help.sap.com/saphelp_nw04/helpdata/en/bf/220c40ac368f5ce10000000a155106/frameset.htm
    Hope it Helps
    Chetan
    @CP..

Maybe you are looking for

  • Can't see backed up filed on My Passport Ultra

    hi, Phil here, new owner... I need help - I can't see my files Steps so far: - Purchased new WD My Passport Ultra metal. Hooked it up to my Lenovo T420 / Windows 7 computer. - Installed all software & updates, etc. - Did a full disk check of all sect

  • Z@RC*.tmp files

    Z@RC*.tmp files are not deleting during logoff on Windows 2008 R2 Terminal Server. Adobe 11.0 is being installed and these temp files are from IE 9.0 Adobe print jobs. This Blog: http://blogs.adobe.com/dmcmahon/2011/11/08/acrobatreader-tmp-files-left

  • How to act a form like a frame with scrollbars?

    How can i setup a form like a frame? I got a long list of input fields in my form which doesn't fit on a page. So i was thinking of creating a form that has frame with scrollbar function, like the iframe in HTML. Is there any way to do this??

  • Most reliable way to find site code in powershell

    Hi, Is there a reliable way of finding the site code for a ConfigMgr 2012 site in powershell? Something like a consistent registry key or a some other way. I did think of looking up the share SMS_sitecode but wondered if there was a better way? Thank

  • ICal unable to sync

    When I upgraded to Leopard iCal worked fine for about 1 week. But since then I am unable to sync my calenders between my different Macs via my .Mac account, while there is no problem syncing the other applications (Contacts, Mail accounts...). Strang