Is it possible to embed html inside a JTextField?

I have a Jpanel, which lists some information, but I want everything on there to be disabled. i.e. the user cant input anything (I want it to be so that the user knows they cant input anything as well)
I have some textFields, but when I setEnabled(false), the text within is rather hard to read, so I wanted to try to use html to make the text bold, but that doesn't work.
I also have a similar problem with havinga JCheckBox selected with is it not enabled. (its tough to see that it is selected)
anyone have any ideas?

Or just make the checkbox's icon ignore the enabled status, as in
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class CheckBoxIconTest {
     public static void main( String[] args ) {
          JPanel p = new JPanel();
          final JCheckBox cb = new JCheckBox( "CheckBox" );
          cb.setIcon( new CheckBoxIcon() );
          JButton button = new JButton( "Toggle Enabled" );
          button.addActionListener( new ActionListener() {
               public void actionPerformed( ActionEvent e ) {
                    cb.setEnabled( !cb.isEnabled() );
          p.add( cb );
          p.add( button );
          JFrame f = new JFrame( "CheckBoxIconTest" );
          f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
          f.getContentPane().add( p );
          f.pack();
          f.setVisible( true );
     private static class CheckBoxIcon implements Icon {
          private JCheckBox cb = new JCheckBox();
          private Icon icon = UIManager.getIcon( "CheckBox.icon" );
          public void paintIcon( Component c, Graphics g, int x, int y ) {
               ButtonModel itsModel = ( (JCheckBox) c ).getModel();
               ButtonModel myModel = cb.getModel();
               myModel.setArmed( itsModel.isArmed() );
               myModel.setPressed( itsModel.isPressed() );
               myModel.setSelected( itsModel.isSelected() );
               icon.paintIcon( cb, g, x, y );
          public int getIconWidth() {
               return icon.getIconWidth();
          public int getIconHeight() {
               return icon.getIconHeight();
}: jay

Similar Messages

  • Is it possible to add HTML inside of a cfgridcolumn

    Hello All,
    I have been searching extensively for an answer, but have
    not yet found it and figured I would post here. Thanks to everyone
    who takes the time with this :).
    My question is this: Is it possible to add HTML to a
    cfgridcolumn?
    My form looks something like this:
    <cfform format="flash" etc..>
    <cfgrid name="mygrid" quer="myquery">
    <cfgridcolumn name="aColumn" heade="myHeader">
    </cfgrid>
    </cfform>
    I have been using Actionscript to adjust the height of the
    column since I am appending multiple columns into one. I can add
    new breaklines and do word-wrapping. The code looks like this:
    function formOnLoad(){
    contactList.variableRowHeight = true;
    contactList.getColumnAt(2).labelFunction = setLabel;
    contactList.getColumnAt(2).wordWrap = true;
    function setLabel(item:Object, columnName:String): String {
    return item.companyName + '\n' + item.description +
    '\n\nMember Since: ' + item.memberSince;
    All I want to do is have a link in the grid (for example I
    want the Company Name to be "clickable" by the user), much like the
    Developer Exchange grid in
    the
    Adobe website.
    Any help would be appreciated.

    Hi,
    if you don't have more tha one clicable event per row, just
    use the row to fire the click event and open the link that way.
    Otherwise, i have no idea what the allowed tags are in a grid
    cell.
    sorry
    tim

  • Embed HTML Code Into Mail?

    Hi,
    Is it possible to embed HTML code into an Apple Mail message? If it isn't, this would be a really useful feature. Lots of sites now, such as YouTube and Flickr, provide snippets of HTML code that you can copy and paste into your "webpage". But how useful would it be if you could paste this code directly into an e-mail? That way you could do things such as embed a YouTube video into an e-mail, rather than just provide a link to it.

    You can do it, but it will not be the easiest thing, and it's generally frowned on, since HTML email is used by spammers and marketers to track whether or not you open their emails. It's much easier and more accepted to just send a link to something you want someone to see; not everyone has time time, patience, or affordable broadband to download a web page with an embedded video window.
    You'd have to do the coding yourself, test it to be sure it works when sending and receiving, and then send it to everyone you want to see it. That's a lot of work for no real benefit. According to Apple, Mail in 10.5 allows the sending of HTML using the Stationery feature; have you tested that or checked the Help files for that to see how it's done?
    Mulder

  • Can you embed HTML code into a Captivate project?

    Hi there.
    Is it possible to embed HTML code into a project? I can't find any options to do it. I'm using Captivate 7.
    Thanks.

    Yes I am talking about the play button when the course launches.  If you modify the index.html to look like this, the course will automatically play instead of showing the play button.
    function initializeCP()
                    function cpInit()
                                    document.body.innerHTML = "
                                    cp.DoCPInit();
                    if((typeof InitAppPackager !== "undefined") && (typeof InitAppPackager === "function"))
                                    InitAppPackager(cpInit);
                    else
                                    cpInit();
                                    cp.movie.play();
    The part in read is the command that I add to the index to make it autoplay.

  • How to Embed HTML into a Infopath form with out using the custom code???

    Hi ,
    This my first post in MSDN, so kindly ignore if there is any faults/mistakes.
    scenario:
    I am updating a HyperLink(url) to an infopath Field (Such as Rich text box /Label) from a third party workflow(Nintex),it is not able to embed the html data .is it possible to embed html controls like <a> and <Br> tags in the infopath form?????

    The InfoPath form can be configured to export some of the fields as columns... by doing so, the workflow can simply update the list item's metadata, and the value is pushed into the InfoPath form data.
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • Is It possible to load Html page inside Adobe Flash...?

    Hi Everyone!
    Is It possible to load Html page Inside Adobe Flash CS5.
    Any help would be a great help...!
    Originally, i wanted to bring in through <IFRAME> but i don't see that flash understands that.
    Thanks in advance!
    -yajiv

    Not exactly sure how you where planning to display that HTML content in relation to the overall page, but given the limitations of Flash... that may just not be possible...
    But, it would be a simple matter to display an HTML iframe over the top of or behind a Flash .swf... So while the iframe would not be a part of the .swf, it certainly could be designed to make it look as though it were.
    Controling the stacking order or layering of content on a Web page is accomplished through z-indexing. Correctly positioned and z-indexed, the iframe could apear over the top of the .swf... the .swf in effect being the background... OR the iframe could appear behind the .swf and with a transparent section in the .swf, the iframe would appear through that hole. If there is navigation or links in the iframe, they will be blocked by the .swf though.
    http://www.w3schools.com/cssref/pr_pos_z-index.asp
    But this may be an option....
    Best wishes,
    Adninjastrator

  • Is It possible to load Html page inside Adobe Flash Professional..?

    Hi Everyone,
         Is It possible to load Html page inside Adobe Flash Professional or Adobe Flex. Thanks in Advance.
    -Vijay

    probably not the way you are thinking.
    flash textfields and their extensions have a limited number of html tags they can parse so, in general, html from most web pages will not display, as expected in flash.

  • Embed HTML tag inside XSLT to generate email content

    I want to Embed HTML tag inside XSLT to generate email content .
    XSLT is not working in Jdeveloper , when i use the syntax <xsl:output method="html" indent="yes" version="1.0"/> in transformation activity .
    Can anyone help to resolve the issue .

    in the <xsl:template match=""/> element you can just start with creating your html document
    so for example
         <xsl:template match="/">
              <html>
    the graphical mapper itself won't i think but when you test the xsl it will still procedure a html document, we use it too to generate the email body contents

  • Is it possible to embed some JavaScript code WITHIN a QT movie?

    Hi,
    This may be a job for QuickTimeKirk, as I've seen (s)he seems quite knowledgeable about QuickTime secrets...
    I'm using a blog service which does not allow the calling of external JavaScript files. Furthermore, testing STAMPot from my excellent fellow compatriot *Francis Gorge* (http://www.qtbridge.com/stampot/stampot.html) did not help me enough because the posts on my blog are contained within tables over which I have little control. In particular, I cannot write a full HTML page description with the <head> and <body> tags, and all the references needed to link to the .js file (and others) created by STAMPot.
    So, I'm wondering if it is possible to embed the appropriate code directly within a QuickTime movie, e.g. under the form of a additional HREF track.
    What I'm trying to achieve, in the end, is to have a poster frame for my movie, and have the movie play within that same poster frame space, but WITHOUT the movie controller +(not the poster frame controller, which I know how to hide)+, and then the movie looping back to the poster frame.
    Maybe I missed something, but in the case I understood correctly what I read on the QT Dev web site, when one passes the controller="false" parameter to the +<embed src="<a class="jive-link-external-small" href="http://...&gt;">http://...> tag, the parameter only applies to the FIRST movie, which is, in fact, the poster frame. Even if the target movie was saved with the controller disabled, this is only acknowledged by QuickTime Player, NOT by the QuickTime plugin.
    Any help will be greatly appreciated!
    Thanks in advance,
    batspray

    1- You can add a frame to the end of the movie, make it an href track that points back to the poster movie. Yes. Illustrated details, here: [http://developer.apple.com/documentation/QuickTime/QT4WebPage/samplechap/speci al-24.html]
    2.- As to the larger question of JavaScript within the QT movie, No. "Starting with QuickTime 7.1.5, you can no longer issue javascript: URLs or call JavaScript functions from within a QuickTime movie. This feature was removed from QuickTime for security reasons." See this official notice: [http://developer.apple.com/documentation/quicktime/Conceptual/QTScriptingJavaScript/bQTScripting_JavaScri_Document/chapter_1000_section1.html].

  • HT5361 Is it possible to embed raw latex into a mail message to display an equation?

    Hi,
    Is it possible to embed raw latex (or any other meta data format like HTML) into a mail message? I would really like to be able to send equations directly without converting them to PDF or GIF first.
    Thanks,
    Joe

    I just borrowed a quadratic equation from the MathML Wikipedia site and grafted it into an HTML document. It imaged fine in Safari 7. It should be noted that neither the latest Google Chrome or FIrefox rendered the same content accurately.
    Laying out your entire email message (including MathML) in HTML can be tedious. Once it is displayed in the browser, each use of the command+I will put the browser content in a new Mail compose window. So, you cannot add an equation to existing Mail composition. Select, copy and paste (or paste and match style) will not work either.
    Depending on the importance you place on email equations, at one time, Design Science (MathType) claimed compatibility with Apple Mail (4.5) where you could input your equation in MathType and it could then be placed within the email. The mail recipient would not need a copy of MathType installed for this to work. MathType even allows you to key your equation in with LaTeX syntax to generate the equation.
    You could check with them about functionality (or restrictions) with Mail 6 and 7 on OS X, as it might provide a more productive way to achieve your goals.

  • Embed  html file without using IFrame UI

    Is there any way to embed html file without using IFrame UI?

    Hi
    To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
    Otherwise, we have only less options!
    if you have anything specific, do let us know
    thanks
    sathya

  • Is it possible to embed Youtube videos in to InDesign?

    Hello everyone,
    im working with a interactive pdf and i need to put in a couple of video's.
    Is it possible to embed Youtube video's into InDesign?
    I know that this question has been asked before, but a answer on it i couldn't find.
    Sorry for my bad english , but after a couple of hours of looking on the internet and experimenting it still doesn't work.
    Thanks,
    Robin

    Here's an interactive PDF with a Flash player I built awhile back embedded
    http://www.zenodesign.com/forum/zenoyoutube.pdf
    This won't work inside of a browser, but if you download the pdf and open it in Reader 9 it should work. You'll have to click the Flash icon and Allow dialogs first then enter a YouTube URL in the field in the lower right corner and click play. Most YouTube URLs from your browser address field should work, i.e. this format:
    http://www.youtube.com/watch?v=c1oMtwmTaNQ

  • How to embed html page in bsp view

    Dear all,
    I would like to embed a html page (eg: www.google.com)  inside bsp view. I have used iframe to do this; but the iframe is getting refreshed everytime a button is getting clicked. Delta handling flag is also not working for iframe. Is there any other method to embed html in bsp view.
    Thanks and Regards,
    Manasi

    Hi Shreya,
    See if this <a href="https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/_s-u/SDN%20Behind%20The%20Scenes%20-%20Embedding%20an%20EP%205.0%20iView%20in%20an%20HTML%20Web%20Page">link</a> helps.
                            OR
    You can create a JSP dynpage in portal application object.
    Along with this JSP and dynpage is created automatically. You can copy the html page and paste it in JSP page. To make it display, include a statement in JSP dynpage as
    this.setJspName("JSPname.jsp");
    For more info on this u can refer:
    http://help.sap.com/saphelp_nw04s/helpdata/en/95/cfa441cd47a209e10000000a155106/frameset.htm
    To get an idea of content development you can refer this <a href="https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2845">weblog</a>.
    Regards,
    Pooja.
    Message was edited by: Pooja S

  • Is it possible to import html files and export them as scorm?

    Hi,
    is it possible to import html files (like a website) and export them as a SCORM compatible ZIP file?
    Thanks!

    You can embed html pages in a Captivate slide and they are included in the SCORM zip file when you publish, is this what you mean?

  • Is it possible in an html to call the objects of a class?

    Hi,
    Please help me.I have already posted it, but it's very urgent i am in need for an working answer.
    I am calling an applet class 2 times in a browser.To share some variable i have declared as private static. But when i call these applets are called in different browsers , still these variables are shared.
    Actually i want the applets in one browser to be independent of the other applets in a separate browser. Can anyone help me to solve this problem?
    Is it possible in an html to call the objects of a class?
    Is there any some workarounds? For instance calling applets in separate JVM in the same machine.Any idea how to do that?
    Another option is using something like the session variables. But is that possible in a variable inside the applet class?
    Thanks in advance to all the solutions. Hope someone clicks an idea from the above possibilities.

    To get a reference to other applets in the same JVM (actually same browser window), do the following:
    //get a reference to the other applets in the same browser window
    java.applet.AppletContext appCon = yourAppletRef.getAppletContext();
    JApplet applet = (JApplet) appCon.getApplet(otherAppletName);or use AppletContext.getApplets() to get an enumeration of all the accessible applets. If you want to use the Session object to store your values, then, in your javascript, make a call to the applet methods. Use JSP expressions for the value of these session String values (i.e. <%= %>) to set the parameters of your applet methods. In a nutshell, it is possible. I hope this helps.

Maybe you are looking for

  • Hyperlinks Not Publishing

    Hi there, I have built the site out, using pdf's as placed objects and enabling as hyperlinks. All work fine in iWeb but once I publish the only page that appears is the splash page- and the hyperlinks are no longer active. I previously had a site us

  • Received fatal alert: handshake_failure!!

    Hi all, I have to connect with a server via mutual authentication. I have to received a server certificate and send my client certificate, which I have stored in cacerts. This certificate is a class 3 certificate from verisign. If I try to connect fr

  • Link of solaris 10 and ebs r11i for solaris

    hi all, I need link of solaris 10 and oracle ebs r11i for solaris to download. Please send me Regards Rizwan

  • What exactly is a Bluetooth favourite device?

    I am having a hard time looking up documentation for how Mac OS X treats Bluetooth devices marked as "favourites"! What does marking a device as a "favourite" do? Why would I do such a thing? The on-line and built-in documentation on Bluetooth does n

  • Help! Photos vanishing from library....

    I began to comb through my iPhoto library to compile a best of 2005 slideshow, and noticed that random groups of photos are gone. I've checked the trash (which has never been emptied), I've gone and looked through the entire library, and I've navigat