JFrame With TitleBar but No Max.Min & Close

Hi All,
I have seen this asked a few times and nobody has ever given a proper solution to it. I wand to create a Frame, not a window, that has a title bar but no sign of the max, min and close buttons. I know how to disable these buttons, but I think it looks rubbish, but would look much better if they were never there.
Come on guys, there has to be a way to do this,
Adam

I don't think there is any way to do it with JNI. Maybe you could modify this to fit your needs. It looks the same whether you extend JWindow or JFrame. I bet this isn;t exactly what you want though.import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Test extends JFrame {
  public Test() {
    setUndecorated(true);
    Container content = getContentPane();
    JLabel jl = new JLabel(new ImageIcon("C:\\duke.gif"),JLabel.LEFT);
    jl.setText("My Program");
    content.add(jl, BorderLayout.NORTH);
    String[] head = {"One","Two","Three"};
    String[][] data = {{"R1-C1","R1-C2","R1-C3"},
                       {"R2-C1","R2-C2","R2-C3"},
                       {"R3-C1","R3-C2","R3-C3"}};
    JTable jt = new JTable(data,head);
    content.add(new JScrollPane(jt), BorderLayout.CENTER);
    JButton jb = new JButton("Exit");
    content.add(jb, BorderLayout.SOUTH);
    jb.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent ae) {
        System.exit(0);
    setSize(200,200);
    setVisible(true);
public static void main(String[] args) { new Test(); }
}

Similar Messages

  • Creating own JFrame header with own max/min/close icons

    Hi,
    I've been busy for a while with L&F. For every component is a UI available which can be used. The only UI i can't find is the UI that controls the header of the JFrame. I've seen some apps which modify it (the alloy look and feel for example). Can anyone tell me which UI to use or where to find a good example. Or is it impossible and is the frameheader platform dependant?
    much thanks,
    Hugo

    Hi Hugo,
    I have done this. You need to write your own RootPaneUI class which uses a TitlePane class. The title pane class is the implementation of the title bar with the min/max buttons etc.
    As of 1.4 there is a new method in the JFrame class for telling the frame to use the current L&F. (see JFrame.setDefaultLookAndFeelDecorated(boolean) )
    Have a look at MetalRootPaneUI and MetalTitlePane. You can get a good understanding from looking in these classes ;)
    However, if you implement your own frame decorations be aware that the resizing of the frame does not allow the gray outline resize. The resizing is carried out by redrawing the frame pixel by pixel which is a real pain. Vote for bug 4803767 at http://developer.java.sun.com/developer/bugParade/bugs/4803767.html
    to get this fixed.
    regards,
    N35Sy

  • JFrames with only the close button

    I have been writing a notepad as my first java project and have done most things but cant seem to fix this: coding a JFrame with only the close button. Most of us know that when you click Help > About... a window pops up describing the company that wrote the software.
    Please help....

    I have been writing a notepad as my first java
    project and have done most things but cant seem to
    fix this: coding a JFrame with only the close button.
    Most of us know that when you click Help > About... a
    window pops up describing the company that wrote the
    software.
    Please help....so whats the problem? you're asking if a person clicks on help->about then a description dialog box should pop up describing the company right? you can use JDialog or a popupmenu. look at the swing tutorial at sun

  • Windows min, max and close buttons are gone my desktop applications

    the min, max and close buttons are gone.
    I have windows 8.1 running in a VMware view environment. if I do a system restore to an earlier date they will come back. but after some windows update they go away again.
    any ideas on what I should be looking for?

    Hi,
    Did you install any 3rd application recently? You can use ShellEX to check shell problem.
    http://www.nirsoft.net/utils/shexview.html
    If problem persists, please try to use command below to fix your problem.
    Dism /Online /Cleanup-Image /ScanHealth
    Roger Lu
    TechNet Community Support

  • By entering App store I get a message that a software update, but this software I have never installed on my computer if I want to upgrade what message he sends me a says this with a different account to mine, will not let me update. If I install this sof

    By entering App store I get a message that a software update, but this software I have never installed on my computer if I want to upgrade what message he sends me a says this with a different account to mine, will not let me update. If Iinstall this software (FACEBOOK), I put as account user account that is not mine, if you change to my account, send an error and will not let medesacragarlo.As I can remove the software actaulización notice?

    Hi...
    I replied to you here > https://discussions.apple.com/thread/3851006?tstart=0

  • Max, Min and Count with Group By

    Hello,
    i want the max, min and count of a table, which is grouped by a column
    I need a combination of these two selects:
    select
         max(COUNTRY_S) MAXVALUE,
         min(COUNTRY_S) MINVALUE
    from
         tab_Country
    select
         count(*)
    from
         (select COUNTRY_TXT from tab_Country group by COUNTRY_TXT) ;
    The result should be one row with the max and min value of the table and with the count of the grouped by table, not the max and min of each group! - i hope you understand my question?
    Is this possible in one SQL-select?
    Thank you very much
    Best regards
    Heidi

    Hi, Heidi,
    HeidiWeber wrote:
    Hello,
    i want the max, min and count of a table, which is grouped by a column
    I need a combination of these two selects:
    select 
         max(COUNTRY_S) MAXVALUE, 
         min(COUNTRY_S) MINVALUE 
    from 
         tab_Country 
    select 
         count(*) 
    from 
         (select COUNTRY_TXT from tab_Country group by COUNTRY_TXT) ; 
    The result should be one row with the max and min value of the table and with the count of the grouped by table, not the max and min of each group! - i hope you understand my question?
    Is this possible in one SQL-select?
    Thank you very much
    Best regards
    Heidi
    It's not clear what you want.  Perhaps
    SELECT  MAX (country_s)               AS max_country_s
    ,       MIN (country_s)               AS min_country_s
    ,       COUNT (DISTINCT country_txt)  AS count_country_txt
    FROM    tab_country
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • How can I get max, min & average (hours with minutes) of fast 30 days data

    Table name:
    run_log
    TYPE VARCHAR2(10),
    SUBTYPE VARCHAR2(10),
    PROGRAM VARCHAR2(100),
    STATUS VARCHAR2(20),
    START_TIME      DATE,
    END_TIME      DATE
    How can I get max, min & average (hours with minutes) of fast 30 days data ?

    Hi,
    you have to use analytical functions:
    SELECT start_day,
           round(AVG(daily_avg)
                 over(ORDER BY start_day ASC RANGE BETWEEN INTERVAL '30' DAY preceding AND INTERVAL '0' DAY following)) AS moving_avg,
           round(MAX(daily_max)
                 over(ORDER BY start_day ASC RANGE BETWEEN INTERVAL '30' DAY preceding AND INTERVAL '0' DAY following)) AS moving_max,
           round(MIN(daily_min)
                 over(ORDER BY start_day ASC RANGE BETWEEN INTERVAL '30' DAY preceding AND INTERVAL '0' DAY following)) AS moving_min
      FROM (SELECT trunc(t.start_time) start_day,
                   AVG((t.end_time - t.start_time) * 24 * 60 * 60) AS daily_avg,
                   MAX((t.end_time - t.start_time) * 24 * 60 * 60) AS daily_max,
                   MIN((t.end_time - t.start_time) * 24 * 60 * 60) AS daily_min
              FROM run_log
             GROUP BY trunc(t.start_time)) t
    ORDER BY 1 DESCAnalytical functions are described in the Oracle doc "Data Warehousing Guide".
    Regards,
    Carsten.

  • I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    I have an Ipad mini with IOS7. A few days ago I began to have problems with wifi connectivity. I can connect to wifi with Google but cannot navigate in Safari nor any of my aps are able to acess wifi. Very strange. Not sure what to do!

    Hi ..
    Reset the device:
    Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears.
    If that doesn't help, tap Settings > General > Reset > Reset All Settings
    If that doesn't help, tap Settings > General > Reset > Reset Network Settings
    You may have to re enter your Wi-Fi password.
    If nothing above has helped, try here >  iOS: Troubleshooting Wi-Fi networks and connections

  • In Primavera Risk Analysis, the MIN. ML, MAX columns is for imput the minimum impact, most likely impact , maximum impact duration of a risk or the remaining duration for MIN, ML and adding remaining duration with maximum impact for MAX?

    In Primavera Risk Analysis, the MIN. ML, MAX columns is for imput the minimum impact, most likely impact , maximum impact duration of a risk or the remaining duration for MIN, ML and adding remaining duration with maximum impact for MAX?

    You are welcome. I'm glad you got it back up.
    (1) You say you did the symbolic link. I will assume this is set correctly; it's very important that it is.
    (2) I don't know what you mean by "Been feeding the [email protected] for several weeks now, 700 emails each day at least." After the initial training period, SpamAssassin doesn't learn from mail it has already processed correctly. At this point, you only need to teach SpamAssassin when it is wrong. [email protected] should only be getting spam that is being passed as clean. Likewise, [email protected] should only be getting legitimate mail that is being flagged as junk. You are redirecting mail to both [email protected] and [email protected] ... right? SpamAssassin needs both.
    (3) Next, as I said before, you need to implement those "Frontline spam defense for Mac OS X Server." Once you have that done and issue "postfix reload" you can look at your SMTP log in Server Admin and watch as Postfix blocks one piece of junk mail after another. It's kind of cool.
    (4) Add some SARE rules:
    Visit http://www.rulesemporium.com/rules.htm and download the following rules:
    70sareadult.cf
    70saregenlsubj0.cf
    70sareheader0.cf
    70sarehtml0.cf
    70sareobfu0.cf
    70sareoem.cf
    70sarespoof.cf
    70sarestocks.cf
    70sareunsub.cf
    72sare_redirectpost
    Visit http://www.rulesemporium.com/other-rules.htm and download the following rules:
    backhair.cf
    bogus-virus-warnings.cf
    chickenpox.cf
    weeds.cf
    Copy these rules to /etc/mail/spamassassin/
    Then stop and restart mail services.
    There are other things you can do, and you'll find differing opinions about such things. In general, I think implementing the "Frontline spam defense for Mac OS X Server" and adding the SARE rules will help a lot. Good luck!

  • My start up disc is full i have a macbook air, i back everuthing up with time capsule and  have movies all my music libraries and photos onto that too so as i have free space, but my max still says my startup disc is full with "other"

    my start up disc is full i have a macbook air, i back everuthing up with time capsule and  have movies all my music libraries and photos onto that too so as i have free space, but my max still says my startup disc is full with "other"

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    According to Apple documentation, you need at least 9 GB of available space on the startup volume (as shown in the Finder Info window) for normal operation. You also need enough space left over to allow for growth of your data. There is little or no performance advantage to having more available space than the minimum Apple recommends. Available storage space that you'll never use is wasted space.
    If you're using Time Machine to back up a portable Mac, some of the available space will be used to make local snapshots, which are backup copies of files you've recently deleted. The space occupied by local snapshots is reported as available by the Finder, and should be considered as such. In the Storage display of System Information, local snapshots are shown as "Backups." The snapshots are automatically deleted when they expire or when free space falls below a certain level. You ordinarily don't need to, and should not, delete local snapshots yourself.
    To locate large files, you can use Spotlight as described here. That method may not find large folders that contain a lot of small files.
    You can also use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • Facebook app is blocked on "waiting..". I tried to close the app firstly but it doesn't appear on the multitasking. I tried the normal and the hard reset. I tried to move the app in another group with itunes but it is still in "waiting". Any suggestion?

    Facebook app is blocked on "waiting..". I tried to close the app firstly but it doesn't appear on the multitasking. I tried the normal and the hard reset. I tried to move the app in another group with itunes but it is still in "waiting". Any suggestion?

    I can't! Tried to deleteit  from the iphone and from itunes but the X doesn't appear!

  • I have a factory unlock iphone 5 with the lasted version. Since yesterday my sim card stopped working and now says `No Sim`, was working fine and stopped working now, other sim works but just not mine. ¿What can be happening?

    I have a factory unlock iphone 5 with the lasted version. Since yesterday my sim card stopped working and now says `No Sim`, was working fine and stopped working now, other sim works but just not mine. ¿What can be happening?

    I thought that, but I put the sim card in another device that is not Apple and works. Definitely the sim card work, but no longer in my iPhone 5 or maybe in any other Apple device, i dont know why!! But i gonna get a replacement to see what happen

  • I have bought a docking station and my iphone works fine but my ipod mini seems to fit on the connection but only works intermittently. Is it a different connection or is there a problem with the ipod?

    I have bought a docking station and my iphone works fine but my ipod mini seems to fit on the connection but only works intermittently. Is it a different connection or is there a problem with the ipod?

    I think that is happening is that the microphone is on during this recording.  If you play the music through the iPhone speakers, it will record this sound, albeit at very poor quality.  If you say anything (or laugh uproariously as I did while watching the app in action, then that, too, get recorded.
    I am still looking for the solution we all want, which is to save the audio in reasonable quality.
    Anyone out there with some ideas?
    Cheers,
    Rob

  • I was given a 16Gb ipad mini retina with cellular but I need more storage. We do not have the receipt as it is a gift. I like to swap for a 64Gb unit and pay for the difference my self, how do I go about doing that? I have not open the packaging yet.

    I was given a 16Gb ipad mini retina with cellular but I need more storage. We do not have the receipt as it is a gift. I like to swap for a 64Gb unit and pay for the difference, how do I go about doing that? I have not open the packaging yet.

    Hi
    Thanks for that. Yes, the ipad was purchased recently. I called Apple last Friday and they ask for the receipt. I wonder if anyone were able to swap their ipad for a larger storage in the past at the apple store without a receipt? 16Gb is such a small storage.

  • JFrame with out icon buttons

    Hi all,
    Is there a way to make a JFram with out the buttons at the upper left and upper right (unix), the ones that min/max the frams on the right and the
    pull down on the left ?
    Also, I know you can make the JFrame not resizable but can you lock it in place in the screen so users can not move it around ?
    Thanks
    Pat
    IMS Field Applications

    Frame.setUndecorated(true); // JFrame inherits this methodI don't know if it works with Unix, but on windows this command removes the border from the Frame or JFrame. The buttons vanish together with the border, and since there is no border to drag, the JFrame is neither movable nor resizable. Another command that makes (decorated) Frames unresizable is
    Frame.setResizable(false);

Maybe you are looking for

  • Qiv not work after system update

    error message: zhiwen ~/ qiv /doc/img/1.jpg Gdk-ERROR **: BadMatch (invalid parameter attributes)   serial 115 error_code 8 request_code 2 minor_code 0 Locking assertion failure.  Backtrace: #0 /usr/lib/libxcb-xlib.so.0 [0xb7b02767] #1 /usr/lib/libxc

  • Labor for purchase - How do we handle that?

    Hi Forum, When an item is Labor or Travel, it is available only for sales? How do you handle a Contract Wage that you buy for 75 dollars an hour but sell it for 150 dollars an hour? Yes we can make the above item a non-inventory regular item (that is

  • My iMacs screen is completely white with no Apple logo

    My iMac chimes but it stays on a complete white screen with a yellow tinge at the bottom that fades about half way, please I have tried all the key strokes but nothing happened

  • Best way to trigger logic when the payment aging

    Hi, I would like to trigger e-mail reminder (daily or periodically) if the customer payments are aging till the payment is been made Could any one throw light on how it would work and with steps to follow. I appreciate your help, and desperately need

  • Zen stone plus - sleep functi

    hey - i have searched as much as i can and it may just be me being an idiot but can anyone tell me if the sen stone plus does in fact have a sleep type function, where you can programme it to switch off after a set amount of time? i thought that was