Change the title of a TitledBorder

I have a titledBorder and set an initial title.
JPanel         panel = new JPanel();
Border         etched = BorderFactory.createEtchedBorder();
TitledBorder   title  = BorderFactory.createTitledBorder(etched, "myPanelNameEnglish");
title.setTitleJustification(TitledBorder.LEFT);
panel.setBorder(title);If the user change the language I also want change the title of the TitledBoarder:
TitledBorder tb = (TitledBorder) panel.getBorder();
tb.setTitle("myPanelNameInFrench");I realize it for all buttons, labels etc. but the title of the TitledBoarder.
Is it possible to change it's title? And how? Please help me :)

Sure you can change the title on the fly.
Here's some code that shows how it is done:
final JFrame f = new JFrame( "Test Frame" );
final JPanel p = new JPanel();
p.setBorder( BorderFactory.createTitledBorder( "This is a title" ) );
p.setPreferredSize( new Dimension( 400, 400 ) );
JButton b = new JButton ( "Click me" );
b.addActionListener( new ActionListener(){
     @Override
     public void actionPerformed(ActionEvent e) {                    
          ((javax.swing.border.TitledBorder)p.getBorder()).setTitle( "Nother title" );
          p.revalidate();
          p.repaint();
p.add( b );
f.getContentPane().add( p );
f.setSize( 500, 500 );
f.setVisible( true );
f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );     

Similar Messages

  • How do I change the title FAQ to Knowledgebase?

    We've widened the use of the FAQ (module) to be a knowledgebase.  But, we have not been able to change the title on the detail page from FAQ.
    Is there a way to change the title?

    Batch renaming is not yet implemented in Photos. As a work-around for now you can search for Automator scripts that will do it.
    Sort order of Album list, Album contents and Folder contents can be changed by checking or unchecking the Keep Sorted By... option under the View menu. I know, very limited options...
    You can request features, point out bugs, etc, at Apple Feedback pages: 
      http://www.apple.com/feedback/
    Or directly for Photos:
    https://www.apple.com/feedback/photos.html

  • How can i change the title and image of  published exe

    Hi ,
    I have published a fla file in exe format .
    how can i change the title and image of this exe? do I ve to
    use some of the available softwares in the market? cant i do the
    customised setting in the flash player itself?

    On Fri, 4 Apr 2008 06:21:15 +0000 (UTC), "mFlexDev"
    <[email protected]> wrote:
    > I have published a fla file in exe format .
    > how can i change the title and image of this exe?
    I beleave the easiest way is to use PEResourceExplorer,
    Resource
    Hacker or similar software to modify EXE resources, such as
    window
    title and window icon.

  • How to change the title of a block/form/table in the WebIC CRM 2007 ?

    Hi,
    We want to change the title of a block in the work area for example from 'Account details' to 'Partner details'.
    After investigation we think that we have to change the text in SOTR_EDIT transaction by editing the Alias or defining a new one with the desired title.
    The problem is that when we search for the alias in the OTR maintain initial screen , we get a list and we don't know which one is the alias associated to the title of our view..
    Is it the right way to proceed or is there any other solution ?
    Your help is highly appreciated.
    Regards
    Nabil.

    Hi Nabil,
    Its so simple,
    Go to the Component/ View : BP_HEAD/BPHEADOverview
    Click on the CONFIGURATION tab.
    Alt+Click on the BP_HEAD : AccountViewSet : Account Details
    Juss Change the Title Account Details to Partner Details.
    That's it. Your block title is changed now from Account Details to Partner Details.
    Best Regards,
    Shiven

  • How to change the title of an existing document?

    I have looked in online manuals and there are no headings for this.  I wish to change the title of an existing documents but can find no way to do so.  Any one have help on this? 

    You can also change the file name in Finder.
    peter

  • How to change the title of an object in the build order window?

    In Keynote '09 v5.1.1 (1034)... How to change the title of an object in the build order window from the default "dropped image" to a specific title?
    I'm running the following:
      Model Name: MacBook Pro
      Model Identifier: MacBookPro2,1
      Processor Name: Intel Core 2 Duo
      Processor Speed: 2.33 GHz
      Number Of Processors: 1
      Total Number Of Cores: 2
      L2 Cache: 4 MB
      Memory: 2 GB
      Bus Speed: 667 MHz
      Boot ROM Version: MBP21.00A5.B08
      SMC Version (system): 1.14f5

    Custom names can't be applied to objects in the build list.
    They are labeled as either; text, shape, table, chart or the filename of an image

  • Does anybody know how to change the title of your podcast on iTunes and the description of it?

    I was working on my feed site and when the podcast popped up on iTunes I realized that I put the wrong info and title on it. Anybody know?

    You change the title and descriptions by entering the changed versions in wherever you originally entered the items in whatever system you are using to create your feed, then re-publish the feed; it will take the iTunes Store a couple of days or so to catch up.
    However, if the method you are using to create your feed is one of those which uses the title of the podcast as part of the URL, and this changes if you change the title, then if you change the URL as a result the iTunes Store will lose contact with it and fail to update in future: so be careful about this.

  • How do you change the title of a validation alert?

    Hello I have some <CFINPUT> code with validation
    onSubmit that is working well. The problem is my boss wants me to
    change the title text on the alert. The alert is generated by the
    <cfinput> validation and not actually in the code I write.
    How would I go about changing the title? To be clear this would be
    the title usually in blue in the alert window that has the X to
    close the window on the right hand side.
    Here is a sample of my code that is using the validation...
    Thanks in advance for your help!
    Dave

    quote:
    Originally posted by:
    north.dave
    I am using <cfform> is that the same as using an HTML
    form?
    If the format attribute is "HTML" or omitted, then yes. The
    error messages created via cfinput are displayed in a Javascript
    alert dialog. The alert dialog can display a user defined message
    but the title cannot be changed.
    This is an older reference (but still accurate)
    http://docs.sun.com/source/816-6408-10/window.htm#1201497

  • FPM - How to change the title in a component configuration

    Hello,
    I am working with the component configuration EHHSS_INC_REC_NRM_QAF_V3 (version 7.31) and I need to change the title of the tab. I created an OTR with the text "Report Near Miss test". I changed the application title and I also change the tooltip text in the IDR to this OTR.
    When I executed it, I only see the modication on the tooltip. Why the application title is not shown with the modification? How can I modify also the tab and the title?
    Thank you for your help!
    Marie-Josée

    Hello,
    Thank you for your time. The application configuration is link to the business object EHHSS_INCIDENT...I did not find a view. I do not have a lot of experience in FPM so can you show me how? I looked in BOPF but I am not able to do it with an enhancement
    Marie-Josée

  • How do i change the title to my photo album:(ios7)

    How do I change the name of the title for one of  my photo albums in ios 7

    When you set the podcast up in WordPress you must have entered a title; it's presumably there that you can change it, and then re-publish it, though I can't advise on WordPress.
    One caveat, though: some podcast creation services derive the feed URL from the title: I don't know whether WordPress is one of them, but if it is you shouldn't change the title because if you change your feed URL withouth redirecting iTunes to a new feed in the proper manner you will lose control of your podcast.
    The method of changing iTunes to a new feeed URL requires the old feed to be left in place with a special tag added to it (I don't know whether this is possible in Wordpress) - the method is detailed here:
    http://www.wilmut.webspace.virginmedia.com/notes/podcast.html#move
    However if the feed URL is not affected by changing the title then you can just go ahead and change it.

  • Change The title of table control

    I have Table Control on Screen 102 called TABCTRL_102.
    General attributes of TABCTRL_102 has
    <b>With title</b> checked and
    <b>Title element name</b>  TXT003
    Now I want to Change The title of my table control through program. Is there a way out.

    Hi Flora,
    Declare a global variable in your TOP Include like,
    DATA: gv_text_tc_102(30).
    Then replace TXT003 in screen painter with GV_TEXT_TC_102
    and mark it as 'Output Only'.
    Then you can fill this variable in one of the PBO Modules of the screen 102 like,
    MODULE <your PBO Module Name>.
    ***Other Code
    gv_text_tc_102 = 'My Text'. "Better use a text symbol
    ENDMODULE.
    Hope this helps..
    Sri
    Message was edited by: Srikanth Pinnamaneni

  • How to change the title of a report by programmation at the run time?

    Hi,
    I would like to change the title of my report at the run time.
    Is it possible?
    If someone can help me...
    Thanks,
    Mbo

    hello,
    what do you mean with "title" ?
    a couple of approaches :
    - Runtime Customization
    - lexicals
    - before report escape HTML
    regards,
    the oracle reports team --pw

  • Change the title of the new HTML page screen

    Hi,
    I would like to change the title displayed in the screen to create a new HTML file from "New HTML Document" to something like "New Page". Is there any properties file which I can edit to get this done? Or does it come from some java class file?
    Awaiting reply.
    Thanks & Regards
    Ranjith

    Hi,
    I have found the text here:
    <i>\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.km.cm.ui\lib\km.appl.ui.edit_api.jar\com\sapportals\wcm\control\edit\ResourceEditControl.properties</i>
    and here:
    <i>\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.km.cm.ui\lib\km.appl.ui.edit_api.jar\com\sapportals\wcm\control\edit\ResourceEditControl_en.properties</i>
    So seems you could change it. But I think when you apply a patch to the KM the .properties files will be overwritten - so you will have to do it again...
    Romano

  • Is it possible to change the title of a webpart using client object model/c#/sharepoint online

    Hi folks!
    I have been busted my butt trying to Write a program changing the title of an existing webpart on on of our subsites on SharePoint online. But I keep getting an error in the very last context.executequery. Tried a bunch of different approaches, but I can't
    make it work. Before I start posting code; I Wonder if anyone have ever done this?
    Its a plain Windows form application, using Visual studio Express and the Client Object model. (Listsing the titles of the webparts Works but changing titles seem impossible. Thought it might be a checkin/out problem but it doesn't make a difference).
    Any help would be highle appreciated.
    Lars

    It depends: are you using the default style for Text Captions? In that case you can change the default style in the Object Style Manager and have it applied to all Captions.
    Or you can change one text caption, and in its Properties panel choose the option 'Save Changes to existing style' from the menu top right (see screenshot). Both methods will work if you didn't override the default Caption Style for those captions. Beware: Quizzing objects can use another style.

  • Can I universally change the title styles in my iMovie? I don't want to retype everything in the new style!

    Can I universally change the title styles in my iMovie? They're all set in "Lower Third" and I need to change all of them to "Gradient White" and I don't want to retype everything in the new style! It'll take forever, as I have many titles in this movie.

    Interesting.  http://help.apple.com/imovie/mac/10.0/#mov9c5e9641f  describes how to change a title.  I tried selecting 2 titles then chaging the style but it didn't work for either.  So it seems the answer is no (though it should be yes).
    Geoff.

Maybe you are looking for