Disable marking the text in JLabel

Hello,
I use the setText(String) method to set the text in the JLabel,
But now i need to disable the marking of that text, while pressing the mouse and moving on the text.
Please let me know how to do that.
Regards
javaxjini

hi,
try this:     JTextField fd = null;
     fd.addMouseMotionListener
          new java.awt.event.MouseMotionAdapter ()
               public void mouseDragged (java.awt.event.MouseEvent e)
                    fd.select(0,0);
     );greetings,
Stijn

Similar Messages

  • How to center the text in JLabel without image?

    I need to center the text inside JLabel, how do i do it?
    Also I need some advise, what is the best way to mark a clicked card (I'm making a card game)?

    I found this method that controls that text alignment:you can try few more:
    label.setVerticalAlignment(JLabel.CENTER);    //these two would  center the label contents
    label.setHorizontalAlignment(JLabel.CENTER);
    label.setHorizontalTextPosition(JLabel.CENTER);Thanks!

  • How can i disable turning the text from black to red when hovering over with a mouse in some forums?

    In some forums posts turn to red when the mouse is in the forum post box. That didn't happen in previous versions of Firefox. It also happens in Opera if that is helpful. Thank you for the help.

    You're welcome
    If those pages are publicly accessible without the need to log in and authenticate then you can post a link and I will see if I can come up with some code for [https://addons.mozilla.org/firefox/addon/stylish/ Stylish] or [http://kb.mozillazine.org/userContent.css userContent.css]

  • Open pdf and the text is in written in wrong font

    hi
    i have a problem with my illustrator.
    i created a pdf file a long time ago. the text is written in times new roman regular.
    now when i open the pdf in illustrator it shows a wrong font. i think the wrong font could be new times romance or something)
    but if mark the text and change the font from regular in bold, it shows the right font (times new roman bold).
    how can i change back the text in times new roman regular?
    im using cs4 on win7. already checked the fonts in systemfolder
    thanks a lot
    thanks

    i deleted and nothing happened.
    edit: i checked the the font with an fontanalyzer. it seems that the font was not new times romance. i deleted the analyzed font and now illustrator showe me the right font.
    thanks

  • Help Please - having difficulties creating af link from the text to an attached file i acrobat

    I have been reading the help, but it just wonn't work when I try.
    I have tried as followed (I am working with a danish version, and hope to matched the same word as in the english version of Acrobat Xpro):
    1. From the toolbox i choose content and then 'hyperlink'
    2. I mark the text from which i wish to make a link
    3. Acrobat respond with an popup picture 'create a link'
    4. From the popup I mark 'Open a side' and push 'next'
    5. Acrobat respond with a new popup picture 'create / go to a side'
    6. I go to the navigator and open the list with attached file's that I have embedded in my acrobat file.
    7. I mark the to which i wish to make a link to
    8. In the popup 'create / go to a side' that stilll is open, i push 'Mark hyperlink'
    Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
    How do i do it right?
    Please help.

    Hello Bernd
    Thanks for a quick respond.
    This corresponds to the text I have tried myself, but apparently I do something wrong
    1.      Open a PDF that contains a PDF file attachment – done
    2.      Go to where you want to create a link. If that location is in the file attachment, click the Attachments button in the navigation pane, select the file attachment, and click open.
    Here I go to side number 10 from which I wish to make a link from (I am not open the attachment file at this moment, as the location not is inside the file attachment).
    (I earlier also tried to  mark the attachment file and click open, and It result that the attached file just opened normally without creating a link to the file).
    3.      Choose Tools > Content > link, and select the area for the link
    Here  I mark the text on side 10 from which I wish to make a link to a attached file
    4.      In the Create Link dialog box, set the link appearance, select Go To A Page View, and then click Next
    Here I have selected ‘Go to a page view’ as told and I click Next
    5.      Set the page number and view magnification you want, either in the parent PDF document or in the file attachment, and then click set link.
    Here I go to the navigation pane and mark the attached file from the file list (the files in the list hasn’t any side number in the list) and then I click Set Link.
    Then I hoped that I have created a link from the acrobat text to the attached file. In stead Acrobat has made a link to the same sidenumber that respond to the text from which i wish to make a link . F.ex. the linktext is on side 10 - then the link goes to side 10.
    What do I do wrong.?
    Med venlig hilsen
    Mogens Pedersen
    Specialkonsulent
    T 33 63 13 07
    F 33 63 10 11
    [email protected]<mailto:[email protected]>
    Fra: Bernd Alheit [email protected]
    Sendt: 2. marts 2012 13:11
    Til: Mogens Pedersen
    Emne: Help Please - having difficulties creating af link from the text to an attached file i acrobat
    Re: Help Please - having difficulties creating af link from the text to an attached file i acrobat
    created by Bernd Alheit<http://forums.adobe.com/people/Bernd+Alheit> in Creating, Editing & Exporting PDFs - View the full discussion<http://forums.adobe.com/message/4241290#4241290

  • I am having difficulty including text with iPhotos I want to share through email.  I get a red exclamation mark along with a statement stating that the text doesn't fit into the designated text area.  This is so frustrating.

    I am having difficulty including text with iPhotos I want to share through email.  I get a red exclamation mark along with a statement stating that the text doesn't fit into the designated text area.  This is so frustrating. Before iLire11 I was easily able to share photos with email messages.  Arghhhh!

    In the iPhoto preferences you can set Apple Mail as your e-mail client and then it will work exactly as before
    LN

  • When i open emails, the text is replaced with question marks and boxes

    i have a macbook pro and when i open email attatchments which are mainly bodys of text, the text is replaced with question marks in boxes, any ideas as to how to help this or even fix it completely!?

    It means the text is a font not supported by whatever you are using

  • How to disable the text field in File upload element?

    Hi,
    How can we disable the text field in the "File upload" UI element so that the user won't be able to type the file path there, but he will still be able to browse the file using the Browse button?
    Regards
    Praveen

    Hi Praveen,
    This is not possible with the Web Dynpro File Upload UI element.
    Thanks,
    Samta

  • 508- Document Properties - Disabled ..."All of the text on this page lacks a language specification"

    Hi,
    When i try to do 508 check. I got the following error message
    "All of the text on this page lacks a language specification'
    I checked "FILE=>Document Properties". All "Document Properties" are disabled. 
    We are using Adobe LiveCycle Designer ES2 to create this dynamic for and save it as static PDF file.
    Still, we have same issue. I am not sure, how to change or setup the language in adobe livecycle designer es2.
    thank you,

    Ah, I don't know that. "Tables" is a collection, not a simple array, and some careless experimentation shows that you cannot simply use .concat to paste them together.
    I'm pretty sure I've seen a couple of workarounds for a situation like this. Perhaps it's time to read "[CS3][JS] everyItem() and getElements()" -- i.e. Marc Autret's blog posts about this, at the end of that thread.
    That is, if you stick to using everyItem()! Perhaps it's easier to build an array "the old fashioned way". This code is based on my earlier assumption you had textframes-in-textframes, but you can rewrite it to cater for groups as well:
    t = app.layoutWindows[0].activePage.textFrames.everyItem().tables;
    tableList = [];
    for (i=0; i<t.length; i++)
      tableList.push (t[i]);
    t = app.layoutWindows[0].activePage.textFrames.everyItem().textFrames.everyItem().tables;
    for (i=0; i<t.length; i++)
      tableList.push (t[i]);
    alert (tableList.length);

  • ADF 11g: inputText - mark the hole text when move into text field

    Hallo,
    is it possible to change the behavior of a inputText component in a way that the hole text is marked when changing the focus to this component? In the standard case the cursor is on the left-aligned position of the inputText. The goal would be to achieve a quick-edit mode with an overwriting of the old value.
    Thanks for any advice
    regards
    Markus

    Hi Markus,
    It seems passing parameter to javascript method is not supported in adf or I may not know the way,
    However, I made below changes to the code provided, it selects the text on clicking on the inputtext but doesn't keep the selection, not sure whether this is a bug:
             <af:inputText ... clientComponent="true" id="it1">
                          <af:clientListener method="selectText" type="focus"/>
             </af:inputText>
                function selectText(){ 
                    var it = document.getElementById("<parent-id>:it1::content");
                    it.select();
                }You can use standard jsf h:inputText component for time being, I will reply once I found solution to use it with adf inputText component:
         <h:inputText ... onfocus="selectText(this)"/>
         function selectText(it){
              it.select();
         }Sireesha

  • HT3529 How do I sent text messages to me as an email?  I have tried this by chosing Edit, then putting a check mark next to the text to send, entered my email and it goes back to the phone as a text msg, never comes to my email in box?

    I have tried to send a text that I received to my email address by hitting, Edit then placing a check mark next to the text to send, entered my email address and hit the send icon.  Three times, the email has come to me as a text and never appears in my email inbox.   Help please!

    I think you're asking this:
    You received a text message.  Now you would like to copy the text message's information and receive it as an email.
    You would do that by copying the text message to your clipboard (hold down the text bubble and select "Copy"), creating an email message, and pasting that text into the body of the email message and sending it.

  • Unable to change the text of a JLabel

    hi!
    i have created a JLabel and add it to my frame. Now, when the user clicks the button on the frame, i changed the test of the label and after that some really heavy processing takes place. and till that processing completes, the changed text does not get display. is it because that the repaint has very low priority? my requirement is that the text shuld get updated immediately.
    Any ideas?
    regards
    Deepak Saini

    I usually suggest to use:
    component.paintImmediately(component.getVisibleRect());
    Wondering what the difference between 'paintImmediately()' and 'update()' was, I created a simple test program. The program simply changed the text in a JTextField 1000 times.
    Here is what I found:
    1) paintImmediately was 10-20% faster
    2) paintImmediately produced no flicker
    I changed my program to use a JLabel instead of a JTextField and found:
    1) update() did not work
    Here is my sample program in case you are interested.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import javax.swing.text.*;
    public class StatusBar extends JFrame
         JTextField statusBar;
    public StatusBar()
    JPanel panel = new JPanel();
    panel.setLayout( new BorderLayout() );
         setContentPane( panel );
              JButton button = new JButton( "Connect..." );
              panel.add( button, BorderLayout.NORTH );
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
         long t1 = System.currentTimeMillis();
                        for (int i = 0; i < 1000; i++)
                             statusBar.setText( "label " + i );
    //                         statusBar.paintImmediately(statusBar.getVisibleRect());
                             statusBar.update(statusBar.getGraphics());
                        System.out.println( (System.currentTimeMillis() - t1) );
              statusBar = new JTextField("No Connection");
              panel.add( statusBar, BorderLayout.SOUTH );
    public static void main(String[] args)
    StatusBar frame = new StatusBar();
    frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
    frame.pack();
    frame.setVisible(true);

  • Cannot enable the text item after disable it in Forms 6i

    Hi All,
    I want to enable/disable the text items depending on the value of the radio group. Since the text items and the radio group are on different tab page, so I place the following code on the WHEN-TAB-PAGE-CHANGED trigger, to do this:
    if :recordgroup ='P' then
    set_item_property(item1, ENABLED,PROPERTY_TRUE);
    set_item_property(item1, NAVIGABLE,PROPERTY_TRUE);
    elsif :recordgroup ='K' then
    set_item_property(item1, ENABLED,PROPERTY_FALSE);
    set_item_property(item1, NAVIGABLE,PROPERTY_FALSE);
    end if;
    When recordgroup is 'K', item1 is disabled, then when recordgroup has changed to 'P', item1 is still disabled.
    Both recordgroup and items are database items.
    How come like this?
    Thanks is advance,
    Vanessa

    Hi Vanessa, you must use a "when-radio-changed" trigger, and you need to know what properties of a item are afected when you change any one of this, for your problem ...
    if :recordgroup ='P' then
    set_item_property(item1, ENABLED,PROPERTY_TRUE);
    set_item_property(item1, NAVIGABLE,PROPERTY_TRUE);
    -- Add this line:
    Set_Item_property(item1, Update_Allowed, Property_True);
    elsif :recordgroup ='K' then
    set_item_property(item1, ENABLED,PROPERTY_FALSE);
    -- If you want, you can delete this line:
    set_item_property(item1, NAVIGABLE,PROPERTY_FALSE);
    end if;
    try it!
    Ruben.

  • I've created a Photoshop PDF and all the text is editbale after passing through indesign to add crop marks and bleeds - one line now isn't editable, what's causing this

    I've created a Photoshop PDF and all the text is editable in the resulting PDF.
    The PDF created by Photoshop is completely editable, all text! I put it through indesign so I could add crop marks and reduce the pdf file size and now all the text is editable except one line!
    I've not used any faux styles or effects...what could be causing this?
    Thanks!

    I've created a Photoshop PDF and all the text is editable in the resulting PDF.
    The PDF created by Photoshop is completely editable, all text! I put it through indesign so I could add crop marks and reduce the pdf file size and now all the text is editable except one line!
    I've not used any faux styles or effects...what could be causing this?
    Thanks!

  • Distance between a li marker and the text

    I know I'm being a little lazy....
    What is the way (best or only) to control the distance
    between a marker for an li (disc, square, etc.) and the text for
    that li?
    Thanks
    Tom

    Pad the <li> tag.
    li { padding-left: 25px; }
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "TCarp" <[email protected]> wrote in message
    news:fnkhu0$q7l$[email protected]..
    > Thanks John
    >
    > That was one of the articles I read trying to find the
    answer to my
    > specific
    > question about controlling the spacing. It talks about
    controlling the
    > DIV and
    > the UL but doesn't go into a discussion about the LI,
    specifically
    > controlling
    > the distance between the marker and the text (at least I
    didn't see it
    > even on
    > the re-read).
    >
    > I guess it's time to set up a test page and drive
    through all the
    > parameters.
    >
    > Thanks anyway
    >
    > Tom
    >

Maybe you are looking for