setLayout « Layout « Java Swing Q&A





1. what does frame.setLayout(null)do?(frame is a JFrame)    stackoverflow.com

I have seen this in a slide but I couldn't get that when and why we use this?

2. Why can setLayout() be called without specifying a class or object in Java?    stackoverflow.com

This is the beginning of the MidiSynth class from the Java Sound Demo. I was under the impression that methods in Java were always called from an object or ...

3. Layoutmanagers, JScrollPane and setLayout(null)    bytes.com

BSCode266 Hey everyone, I'll cut right to the case. I have a JPanel and i call setLayout(null) on it. Simply because I would like to position everything myself and haven't seen ...

4. use of null with setLayout statement    coderanch.com

I'm moving this to Swing / JFC/ AWT, as it has nothing to do with certification. If you post more info there perhaps we can help. In particular, if you post the code which you're currently using (after removing any lengthy parts which are irrelevant to the problem) then hopefully we can see why it's not working.

5. ref to setlayout(null)    coderanch.com

My guess is that you're not even executing the init method, since if you were you'd get a NullPointerException for each setBounds that you execute before the component is initialized. That is,

 name.setBounds(10,10,280,25);
can't be before
 name=new TextField();
because name is null at first. If this didn't cause an error, you have a more serious problem. I'm assuming your ...

6. Problem with setLayout    coderanch.com

7. getPrefferedSize setLayout(null) 0 0    coderanch.com

Originally posted by Oczek Oczkowy: hi, i have problem when i set my Jpanel layout to null (Jpanel.setLayout(null)) and i add there some buttons or different stuff my jpanel.getprefferdSize return 0 and i can not see my buttons. Do anybody have idea how to repair that? Well that's what you should expect when you set your container's layout manager to null. ...