frame.setResizable(false) does not work

How do I disable the feature of resizing my JFrame?

My Code is as follows the frame.setResizable(false) does not work.

public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {
        public void run() {
            try {
                SearchIncome frame = new SearchIncome();
                frame.setResizable(false);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    });
}

public SearchIncome()
{     
    setTitle("DPSS: Search Income");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 790, 400);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);
    this.setIconImage(Toolkit.getDefaultToolkit().getImage("images\\icon.jpg"));

Answers


In the previous class where i call the class with the code above i should have entered this:

 SearchIncome page = new SearchIncome(); 
 page.setVisible(true); 
 page.setResizable(false)

When opening the page! thanks for the help!


Need Your Help

How can I return something else than 0 from a FreeBSD system call

kernel return-value freebsd syscall

I have written a syscall that sets a variable in td_sched that I added earlier

don't execute for file in ls do

linux bash for-loop

I have a script that has to process some files (name beginning with AB) in a directory.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.