How to change the JFrame's title?

Is it possible to change the title of a JFrame at runtime?
If so, how?
sincerely
nir

See JFrame.setTitle(String).
Shaun

Similar Messages

  • How to change the default text title of Detached table/treetable

    Hi,
    Is anybody know How to change the default text title of Detached table/treetable.
    I have already read the post on "http://vtkrishn.com/2010/07/28/how-to-change-the-default-text-title-of-detached-tabletreetable/"
    as per this post It will change the title throughout the application.
    I wanted to change only for one particular table.
    Thanks,
    Charu
    Edited by: Charu on Sep 13, 2012 4:14 AM

    Hi,
    please don't double post and instead continue with your original threat. In the previous post you got the correct answer to use skinning. You did not like the solution as it doesn't allow per-instance titles. I agree with this and a logical consequence is to file an enhancement request instead of re-posting the question. I'll file the ER, so no need to follow up for you anymore
    Frank

  • How to change the selected tabPane title color in JTabbedPane

    how to change the selected tabPane title color(or set bold) in JTabbedPane.
    Any advice will be appreciate.

    Hi,
    try
    // Set text color for the selected tab
    tab.setForegroundAt(tab.getSelectedIndex(), Color.red);Hope that helps

  • How to change the image in title bar for JFrames

    plz give me a small code to change the image of the JFrame in the Title bar.
    i know how to change the name of the title bar .
    import javax.swing.*;
    class Rathna1 extends JFrame
    Rathna1()
    super("rathna project ");
    public class Rathna
    public static void main(String ax[])throws Exception
    Rathna1 r=new Rathna1();
    r.setVisible(true);
    r.setSize(400,400);
    Like this how to change the image of the title bar
    Message was edited by:
    therathna

    hi,
    JFrame frame;
    frame.setVisible(true);
    frame.setIconImage(new ImageIcon("icons/img007.gif").getImage());
    frame.setSize(800,600);
    i think the thing u r searching is :
    frame.setIconImage(new ImageIcon("icons/img007.gif").getImage());
    ~~~radha

  • How to change the JFrame's titlebar's icon's context menu's font?

    Hi everyone.
    I want to know how to change the font of the text that appears in the context menu originated from right clicking at the icon that's all the way to the left in the titlebar of JFrames that use the default look and feel for decoration (JFrame.setDefaultLookAndFeelDecorated(true); // which uses the Metal L&F, Ocean theme).
    I searched around and found nothing. I thought that I could use what I learned at https://forums.oracle.com/message/9221826, but I couldn't come up with something that worked.
    Thanks in advance.t

    After some more messing around, I finally made it! I like Java so much that it makes me a bit sad how hard it is to do stuff like this. Anyway, I found a method here to recursively change the font of all components from a JFileChooser, but it doesn't work on the JPopupMenu (now I know the name) that pops up from the titlebar's icon. So I messed around with that method, used some casting, and was able to change the JMenuItems' font:
    public static void setSubComponentFont (Component comp[], Font font) {
        for (int x = 0; x < comp.length; x++) {
            if (comp[x] instanceof Container) {
                setSubComponentFont(((Container)comp[x]).getComponents(), font);
            try {
                //comp[x].setFont(font);
                if (comp[x].toString().contains("JMenu")) {
                    for (Component y : ((JMenu)comp[x]).getPopupMenu().getComponents()) {
                        if (y.toString().contains("JMenu")) {
                            y.setFont(font);
            } catch (Exception ex) {}
    I was inspired to use .toString().contains() by this thread.
    I also did this with nested loops, so the path to the menu items can be seen:
    for (Component a : frame.getLayeredPane().getComponents()) {
        System.out.println(a.toString());
        if (a.toString().contains("MetalTitlePane")) {
            for (Component b : ((Container)a).getComponents()) {
                System.out.println(b.toString());
                if (b.toString().contains("SystemMenuBar")) {
                    for (Component c : ((Container)b).getComponents()) {
                        System.out.println(c.toString());
                        for (Component d : ((JMenu)c).getPopupMenu().getComponents()) {
                            System.out.println(d.toString());
                            if (d.toString().contains("JMenu")) {
                                d.setFont(font);
    Every System.out.println() gives a hint to what should go on the following if condition, so they should be used one at a time. This doesn't work for the JFileChooser's title font though. When I have time I'll either look further into it or ask another question.
    So, if someone else needs it like I did, here it is. As a tip, System.out.println() and .toString() are your friends! That's how I learned what was contained in each object, and what path I needed to take to get to the objects of interest.
    Thanks anyway!

  • How to change the web page title of a web dynpro app?

    Hello,
    I would like to change the HTML page title of a web dynpro application without renaming the application component itself - but how?
    Thanks for your comments!

    Hi M Walter,
    Assuming you are using Web Dynpro Java, you can change the title of the Web Page for Web Dynpro App by adding the title to the main window of your app.
    Go to Windows and open the properties. There will be a field called 'title'. Give the title you want, save, build, DC->Build and deploy.
    The title you gave to this Window will be displayed as the title of your Web page.
    Regards,
    Ajay

  • 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

  • How to change the Browser title when report runs on the web?

    Hi folks,
    How to change the title of the browser when I run my report on the web? Iam using Internet explorer and Reports 6i. Is it possible in 6i or 10g reports?
    Could you please tell me the step by step procedure ?
    Right now the browser is displaying the URL when I run the report with format = PDF.
    Thanks.

    It works for me. I don't see why you have a problem with >this code.
    Can you look at the source code of the html >file that was created (so, not in the browser, but in a >text editor). What do the header and title look like?The Html code in the file is same as the above code I specified. Actually I copied the same code and pasted here. But when I run the html file the Title shows up.
    Don't put </html> there. Maybe that helps. I tried this, but it did not work.
    Please let me know is there any way to set it dynamically inside the triggers using SRW built_in.
    Thanks alot.

  • How to Change the Windows Title in EP7.0

    Hi
    Can anyone provide some pointers on how to change the windows title bar in EP 6.0
    We would like to remove the words "SAP Netweaver Portal" from the title.
    I have found OSS note  695903 however this refers to EP6.0
    Thanks in advance.
    Ian

    Hi,
    For people who have no access to the note, here are the steps involved. The same steps are listed in the note :
    1) Logon to your portal with your user who has super_admin role.
    2) Go to the System Administration tab -> System Configuration tab.
    3) Go to the Service Configuration -> Central Configuration.
    4) Change the portal.html.head.title part. Do no forget to save the changes you made.
    5) Restart the j2ee server to be able to see the changes on the portal
    Cheers,
    Sunil

  • How Can I change the colour in title bar of Window in Form 9i

    Hello
    All,
    I want to change the colour of title bar in window ?
    how can I ?
    From
    Chriag Patel

    Chirag,
    this is not in a scope of control for Forms and instead determined by the look and feel.
    Frank

  • How to change the Window Title on a per build spec basis?

    I would like to be able to make 4 "build specificiations" against the same Startup-VI and be able to have the Window Title different in each of the output executables.   I know how to change the Window Title for the VI itself, but for some reason, I don't see the ability to override this information in Source File Settings --> Customize VI Properties dialog of the build specification.    Is there perhaps a way to do this programattically with VI server?  Perhaps there is a way I can define a unique symbol on each of the build specs and then do a case statement in code to determine which title to display based on the symbol that was defined?
    Thanks,

    You can use the appropriately named Window Title property. In your project you can define conditional disable symbols (right-click on the project node and select Properties) and then use a conditional disable structure in your code. However, these symbols apply to the entire project, not to a specific executable. Thus, a better route would be to use the executable name (also accessible via a property), if possible, or some other distinction between the executables. What makes the executables different?

  • Display PDF document from Servlets to browser - how 2 change the title

    Hi, need help of changing the html title when Display PDF document from Servlets to browser. By default the browser's title shows the obsolute URL where the rdf comes from (i.e. http://www.google.com/sample.pdf), because servlet responds a binary data (PDF), there seems to be no other way to change the browser's title to fit my own choice.
    Appreciate your quick help,

    You can try and check with
    .setTitle("Welcome");

  • How to change the icon of the Frame(JFrame)

    my doubt is,
    how to change the by default icon(sun coffee cup) icon of a frame to a small user defined icon.
    thank you,
    Ranjith.M

    Take a look at this method:
    http://java.sun.com/j2se/1.4/docs/api/java/awt/Frame.html#setIconImage(java.awt.Image)

  • How to change the default orientation?

    Hello,
         I'm new to Adobe Flash Builder and I am currently making a mobile application for a school project. I was wondering how you change the default app orientation to landscape. I've tried going into my app.xml and change the aspect ratio to landscape with no luck, and it is very hard to find any answers on the internet. I would greatly appreciate your help.
    HomeView.mxml Code:
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark"
                        actionBarVisible="false" tabBarVisible="false" title="HomeView">
              <fx:Declarations>
              </fx:Declarations>
              <s:Image left="0" right="0" top="0" bottom="0" scaleMode="zoom" smooth="true"
                                   smoothingQuality="high" source="@Embed('file:///C:/Users/Owner/Downloads/48127-solarsystem-teaser.jpg')"/>
              <s:Button x="-5" y="0" width="410" height="1504"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Sun)"/>
              <s:Button x="444" y="852" width="80" height="80"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mercury)"/>
              <s:Button x="628" y="742" width="120" height="124"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Venus)"/>
              <s:Button x="836" y="632" width="127" height="117"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Earth)"/>
              <s:Button x="994" y="506" width="99" height="96"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Mars)"/>
              <s:Button x="1255" y="464" width="298" height="279"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Jupiter)"/>
              <s:Button x="1626" y="302" width="274" height="270"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Saturn)"/>
              <s:Button x="1965" y="196" width="175" height="174"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Uranus)"/>
              <s:Button x="2201" y="66" width="175" height="174"
                                    skinClass="spark.skins.mobile.TransparentNavigationButtonSkin" click="navigator.pushView(Neptune)"/>
    </s:View>
    App.xml code:
    <!-- The initial aspect ratio of the app when launched (either "portrait" or "landscape").
                                  Optional. Mobile only. Default is the natural orientation of the device -->
                        <!-- <aspectRatio>landscape</aspectRatio> -->
                        <!-- Whether the app will begin auto-orienting on launch. Optional. Mobile
                                  only. Default false -->
                        <!-- <autoOrients>false</autoOrients> -->
    I need to make it so that the app is permanently in landscape.
    Thanks again.
         8th grade student

    <!-- <aspectRatio>landscape</aspectRatio> -->
    <!-- <autoOrients>false</autoOrients> -->
    In XML, everything within <!-- and --> is a comment.  You need to remove the <!-- and -->:
    <aspectRatio>landscape</aspectRatio>
    <autoOrients>false</autoOrients>

  • How to change the tab on a web browser

        Hello,
    I do not know how to change the (index.html) tab. When you have several of the tab on your browser open, the name appears in the middle of tab, mine continues to say the INDEX.html. I just need to know how to go into dreamweaver and change the title tag. In the actual HTML I have changed it and it still hasn't worked. please help, thanks!

    Oh I see. You also posted another question about the page not working on mobile devices
    http://forums.adobe.com/thread/1342179
    The page name in the browser tab comes from the text inside the <title> tag.
    Line 5: <title>INDEX.html</title>

Maybe you are looking for