All Questions

197
votes
11answers
34482 views

How to add JTable in JPanel with null layout?

I want to add JTable into JPanel whose layout is null. JPanel contains other components. I have to add JTable at proper position.
67
votes
4answers
3582 views

Java GUI listeners without AWT

I am a starting Java developer, learning just from internet tutorials. I am learning full screen GUI applications. I was told yesterday that I shouldn't use AWT in my programs, because it is outdated....
665
votes
66answers
418285 views

Why not use tables for layout in HTML?

It seems to be the general opinion that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to ...
820
votes
10answers
542606 views

What is a clearfix?

Recently I was looking through some website's code, and saw that every <div> had a class clearfix. After a quick Google search, I learned that it is for IE6 sometimes, but what actually is a c...
1597
votes
35answers
1028422 views

Get screen dimensions in pixels

I created some custom elements, and I want to programmatically place them to the upper right corner (n pixels from the top edge and m pixels from the right edge). Therefore I need to get the screen wi...
12
votes
4answers
2101 views

Why is it frowned upon to use a null layout in Swing?

Recently, I started creating a program for the company I work for. Just as background info, I'm still a student and a beginner programmer, so my solution is probably not recommended and I didn't know ...
1412
votes
15answers
1050710 views

Get the size of the screen, current web page and browser window

How can I get windowWidth, windowHeight, pageWidth, pageHeight, screenWidth, screenHeight, pageX, pageY, screenX, screenY which will work in all major browsers?
836
votes
16answers
247447 views

How do you keep parents of floated elements from collapsing?

Although elements like <div>s normally grow to fit their contents, using the float property can cause a startling problem for CSS newbies: if floated elements have non-floated parent elements, t...
710
votes
25answers
465229 views

Using jQuery to center a DIV on the screen

How do I go about setting a <div> in the center of the screen using jQuery?
198
votes
14answers
118334 views

How to retrieve the dimensions of a view?

I have a view made up of tablelayout, tablerows and textviews. I want it to look like a grid. I need to get the height and width of this grid. The methods getheight() and getwidth() always return 0....

Previous Next