Text are+button, some change in text

Sorry for that question, but i don't understand.
I have a text are, and a button. I need, then i selected some text in text area and press the button, the <b>my letters </b> will be add. How do that? I don't undestand at all =(
Big thx for any help.
If you don'y mind, please make example. Thx very much

I solve the problem
String awd = jTextArea1.getSelectedText();And all code, if any one need
import java.awt.*;
import java.awt.event.*;
import java.awt.datatransfer.*;
import java.io.*;
import java.util.*;
import javax.swing.table.*;
import javax.swing.*;
import javax.swing.text.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
* @author mmakarov
public class TextEditor extends javax.swing.JFrame {
    /** Creates new form TextEditor */
    public TextEditor(
        initComponents();
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        jButton1 = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        jButton1.setText("jButton1");
        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jScrollPane2.setViewportView(jTextArea1);
        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 243, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap())
                    .addComponent(jButton1)))
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(75, 75, 75)
                .addComponent(jButton1)
                .addContainerGap(46, Short.MAX_VALUE))
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
        pack();
    }// </editor-fold>
    * @param args the command line arguments
     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
System.out.print("Hello World ^_________^");
String asd = jTextArea1.getText();
String awd = jTextArea1.getSelectedText();
try {
    if (awd != null)
        jTextArea1.setText("<b>"+awd+"</b>");
   System.out.print(awd);
else
System.out.print("la la la~ figna");
catch (Exception ex)
    System.out.print(ex);
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new TextEditor().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JButton jButton1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextArea jTextArea1;
    // End of variables declaration
}

Similar Messages

  • Can't select buttons to change text

    I set up chapters in I-Movie and exported the project to I-DVD.
    When I go to a chapter screen it will highlight the lower right button and allow me to change its text, button shape etc., but I cannot access the other buttons to change text.
    I tried changing the mouse click speed as instructed, no luck.
    I tried changing the the chapter titles in I-Movie but that only posted the top text line.
    Any ideas as to why I can't select these chapter buttons to change text?

    This is what I had to do to change text on buttons.
    I could only change the text on the lower right chapter button.
    Then moved the button up, left, whichever, to cause a new button to fall into the "prized" lower right spot. I could then change the text on that button. So on and so forth.
    The major problem is that the buttons, now with the correct text, are all out of order. It now became some kind of torture to find the right combo of moves to get the buttons back in the same order. I'd advise saving backup if you decide it's not worth the work.
    For transitions I used the "select all button" option in "Edit" to avoid the torture test.
    Once this project is done I'm reloading IDVD but maybe this will help somebody in the meantime.
    Good luck

  • 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

  • [svn] 3410: Here are some changes to DataGroup.

    Revision: 3410
    Author: [email protected]
    Date: 2008-09-29 15:27:50 -0700 (Mon, 29 Sep 2008)
    Log Message:
    Here are some changes to DataGroup.
    The big change is the way we instantiate components. We aren?\226?\128?\153t re-using the Group logic anymore. This means there?\226?\128?\153s no display object sharing going on, which reduces the complexity of the code. It also treats renderers differently now. Basically anytime a renderer is specified, it?\226?\128?\153ll attempt to wrap you up in that renderer, even if you are a GraphicElement or a DisplayObject and may not need one.
    There are some other changes, like changing an itemRenderer at runtime now works. It?\226?\128?\153s a bit heavy in what it invalidates right now, but I?\226?\128?\153ll go back and revisit some of this logic.
    Also, when no dataProvider is given, we don?\226?\128?\153t automatically create one for the user. This means I had to add some defense mechanisms where we were relying on the dataProvider, but doing a check for dataProvider != null was all that was really needed.
    QE: Yes
    Doc: Yes
    Bugs: SDK-16809, SDK-16983
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-16809
    http://bugs.adobe.com/jira/browse/SDK-16983
    Modified Paths:
    flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as
    flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as

    Hi there,
    We had a glitch on our side that was causing some accounts to not be able to log in properly. It should now be resolved. Please clear your browser's cache and try it again. Let us know if it's working for you.
    Regards
    Mike

  • Hi, I tried to change my security questions on the internet. But, for some reason, the button to change them is not there! This is annoying as I have recently bought an iTunes voucher and now I cannot buy any new apps. Can anybody please help me!!

    Hi, I tried to change my security questions on the internet. But, for some reason, the button to change them is not there! This is annoying as I have recently bought an iTunes voucher and now I cannot buy any new apps. Can anybody please help me!!

    Security questions:
    https://discussions.apple.com/docs/DOC-4551

  • PSD Rollover Button with image in front stops button from changing state

    I have a wide PSD button that changes state when rolled over. I would like to place a PNG image with transparency in some areas over the top of it so that the rollover button shows through the transparent areas of the PNG.
    How can you get it to do the rollover effect when the user mouses over the bit of the button that the image is in front of? Is ther a way of making the PNG 'invisible' to the mouse?
    I know I could redesign the button so that it includes the image but I'm trying to keep file sizes and load times to a minimum, I use this button a lot on my website with a different on each, and having that number of individual buttons would result in a bloated, slow-loading website.

    Hi Abhishek
    Thanks for your reply. I was able to achieve the effect I wanted by having the PNG and the PSD Button with the same link and then grouping them. This means I can mouse over the PNG and still get the PSD rollover effect, which is perfect.
    However I also have another similar problem. I have some different PSD Rollover Buttons which have some text in front of them (basically it's the button label). On some of these buttons when you roll over the text it prevents the rollover state of the button, and on other buttons the rollover effect occurs as it should, and there doesn't appear to be any consistency about which does what. Grouping or ungrouping doesn't appear to make a difference. Can you help?

  • I would like  to make some changes in GR91 payment term

    Hi Gurus,
    I am pretty new to SAP ERP. I got assigned the ticket as requested below.
    Business requirement:
    I would like  to make some changes in GR91 payment term.
    1.        85 days from invoices (instead of 93)
    2.        Only the 5th of each month , will be the bline day (payment day), instead of 5th & 20 th.
    My Analysis:
    I have checked OBB8 in EED system for payment term GR91 and I could see the below 3. Here I have attached one file with business requirement and GR91 payment term screenshot.
    1. PT - GR91
    Day Limit - 4
    Fixed day - 5
    Additional Months - 3
    Default baseline date - Document date
    Sales Text - 20-31 at 5th (93 days frm Inv)
    Own Explanation - 01-04 at 5th (93 days frm Invoice)
    1. PT - GR91
    Day Limit - 19
    Fixed day - 20
    Additional Months - 3
    Default baseline date - Document date
    Sales Text - 20-31 at 5th (93 days frm Inv)
    Own Explanation - 5-19 at 20th (93 days from invoice)
    1. PT - GR91
    Day Limit - 31
    Fixed day - 5
    Additional Months - 4
    Default baseline date - Document date
    Sales Text - 20-31 at 5th (93 days frm Inv)
    Own Explanation - 20-31 at 5th (93 days from invoice)
    Please help me in this regard. How could I go ahead with configuration, what are the options I should select in OBB8.
    Thanks in advance for your help............
    Thanks & Regards,
    Siva

    Hi Siva,
    Day limite 5 doesn't allow GR91 use after 5th day. So you will have precisely 85 day.
    If you want have unlimited day use and fixed day you have never precisely 85 days.
    Please do a test. Define OBB8 and replace a Vendor Invoice Payment term to GR91. Look at FBL1N the due date.
    regards

  • I shared my project and saved it as .mov but when i reopen the fcp the project is one big clip, and now i cant re-edit the video, cant see all the clips, just one big clip,,,pls help, i need to make some changes to the project..thanx

    I shared my project and saved it as .mov but when i reopen the fcp the project is one big clip, and now i cant re-edit the video, cant see all the clips, text's, effects, etc..... just one big clip,,,pls help, i need to make some changes to the project..thanx

    Hi Stephen, thanx...
    Yes, we are talking about FCP X...this is the thing:
    I worked on a project a few days ago and went to share - export movie.
    Today, i opened the FCP again, to make some changes, and when i enter to the project, it shows me as one big clip.....i dont see it says compound clip....and i tried anyways pressing break appart clips...but nothing....could it be that i made it compound before exporting it..? if so how can i recover the un-compound version >?
    I tried to import the saved .mov file, but it opens the same....as one long clip...
    Pls help...thanx.

  • Perform some changes on standard SAP webdynpro for ABAP application

    Hi,
    We do need to perform some changes (new buttons, new tabs, adding new code etc) on a standard SAP product developed on Webdynpro for ABAP.
    Which is the best approach to do so? I have reading about enhancement framework and it seems to be right solution to do so. Am I correct?
    Any best practice to acomplish our target is very welcome.
    Looking forward to hearing from you.
    Kind regards,
      Imanol

    You are on right track thinking about enhancement framework.
    My approach is would be in the following order.
    Personalization/customization
    Enhancement
    Modification

  • TS3408 I have created a web site using iWeb. It has been running fine. I have made some changes to the site and it won't show the updates in Safari, but does show the changes in Firefox

    I have created a website using iWeb. It has been running fine, with no problems at all.
    I have recently made some changes and the updates don't show in Safari, but when I open Firefox, the changes are there. It doesn't show the updates in Chrome on my iphone either? Any suggestions?

    You can also reload web page(s) and bypass the cache.
    *Press and hold Shift and left-click the Reload button.
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Cmd + Shift + R" (MAC)

  • Are there some Font supporting all utf-16 code including all supplementary?

    Are there some Font supporting all utf-16 code including all supplementary code?
    In an application, I need to show some text encoded in utf-16, which is multilingual and
    Have some of supplementary character, so want to know a font to show it correctly? While find nothing from the internet, so anybody can instruct me will be very appreciated&#65281;Looking forward to your response, thanks.
    Message was edited by:
    passenger2007

    Probably not. you might find some fonts listed her that support what you are interested in.
    http://www.google.com/search?q=font+that+supports+all+unicode+characters

  • Hi are there some who can help i am trying to update my programs in app store

    hi are there some who can help i am trying to update garageband ,iphoto and iMovie on my iMac, but it´s not my apple id  it will use to the update, so i dont now the email and the  password for the email used, and i cant change it to my apple id
    my problem started after i updated to maverick
    i hope there are someone who can help ???

    hi are there some who can help i am trying to update garageband ,iphoto and iMovie on my iMac, but it´s not my apple id  it will use to the update, so i dont now the email and the  password for the email used, and i cant change it to my apple id
    my problem started after i updated to maverick
    i hope there are someone who can help ???

  • How do you keep your purchased apps if you are forced to change your Apple ID?

    How do you keep your purchased apps if you are forced to change your Apple ID? A good example is if you are forced to change your email, which you use as your Apple ID.  what if it is a security app and you lose a lot of data if you lose the app? Why are the apps tied to the Apple ID rather than the user? Why is it impossible to globally change the Apple I D?

    All content is tied to the account, but you can change the primary email address on an account e.g. you can log into your account via the Store > View Account on your computer's iTunes and there should be an Edit button to the right of your account id on your account's page, or similarly on your iPad try tapping on your id in Settings > iTunes & App Store and view your account. Or you can update it by logging into it via this page http://appleid.apple.com . You shouldn't lose any content on the account if you update it.
    After updating the account you may need to log out of your iPad by tapping on your id in Settings > iTunes & App Store and then log back in with the updated version for it to be 'refreshed' on it

  • Maybe its just me but verizon had my rebate for a month and some change and  still haven gotten it i got this contract on july 10, and my samsunsung galaxy s4 does nothing but shut off on me constatntly and they wont even help..any suggestions because im

    maybe its just me but verizon had my rebate for a month and some change and  still haven gotten it i got this contract on july 10, and my samsunsung galaxy s4 does nothing but shut off on me constatntly and they wont even help..any suggestions because im looking into a lawsuit now so aggravating..my phone is def on a blank sceen right now

    JCLouis, 
    We saw your story and are very worried about what we read! This isn't like us at all and we are here to help sort it all out. We recommend calling the Rebate Center to check on the status. Their number is 1-800-457-0864.
    We can help you right here with your phone! How often does it turn off? Is it just that the screen goes black or does it completely power down? Also, does it start back up by itself if it does power down?
    SarahO_VZW
    Follow us on Twitter @VZWSupport

  • In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)

    In Firefox 4 how can I cause the date on downloaded files to be the current date? (Some are and some are not. In FF3 the dates were ALWAYS the current ones.)
    == This happened ==
    Every time Firefox opened
    == I upgraded to Firefox 4 (beta)

    Firefox 3.6.* and earlier set the downloaded file's modification time to the current time. In Firefox 4.0 the behavior has been changed, if a server returns a timestamp telling when the file was last modified (Last-Modified header), it is used instead.
    You can revert to the previous behaviour by using the [https://addons.mozilla.org/en-US/firefox/addon/93121/ Download Timestamp] add-on.

Maybe you are looking for

  • How do you start up from an external hard drive

    I read the one post about this but i was un clear. Im trying to find out how to do this for my friend with a G3 that is no longer working. They have an external hard drive that is firewire and the newest version of tiger. So if someone could give me

  • Nilvce dll on 64 bit OS ?? (in english)

    The same message in english. Hi, I develop, under LabVIEW, two applications in two different projects. I build the executable of each application in his respective project. This two executables share data via shared variables in "single process" on "

  • Mouse pointer moving of own accord

    Hi all, Recently a strange problem manifested itself. Whenever I click and hold on the trackpad, the mouse pointer on screen moves straight downwards at a slow speed. However, it seems only confined to my admin account and not any newly created users

  • Restriction of Users to access other Profit Center Data

    Hi All, We have a Ztable to maintian User Id and Profit Center ranges (from to). This well help us to enter an user id and a Profit Center range in the Ztable. Later this particular User will be having access to only these (mentioned in the Ztable) P

  • Conversion of IPG's to Process chain

    Hi All, Please tell me the procedure to convert the IPG's to Process chain . Thanks & Regards, Rashmi.