JTable

How would i go about programming in a JTable
[51 byte] By [ichbinsterbena] at [2007-11-27 2:30:44]
# 1
Step 1: Form a meaningful question.Step 2: Post it in the swing forum.
hunter9000a at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 2

hmm...

probably with...

import javax.swing.JTable;

public class SomeName{

private JTable someTable;

}

MaxxDmga at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 3
ok smart a.s.s.I actually need to be able to place objects in certain spots of the screen, not using BorderLayout, nor GridLayoutMessage was edited by: ichbinsterben
ichbinsterbena at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 4
interesting, and how does the JTable fit into this ?
MaxxDmga at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 5

i dunno, people tell me i should use a JTable, i just need to be able to place objects where needed in a nice format

A Label hereAnother Label Here

Textbox here Textbox here

it needs to start from the left side

Message was edited by:

ichbinsterben

Message was edited by:

ichbinsterben

ichbinsterbena at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 6
it sounds like you need the right layout manager, not necessarily a JTable. Unless the result resembles a large grid of components? Will the result look like a table?
DrLaszloJamfa at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 7
noim prompting questionsNumber of Pieces -Final Dimenstions[Textbox Here] --[Textbox] [Textbox] [Textbox]excluding the linesunderstand?
ichbinsterbena at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 8
Sounds likes a job for LayoutManagers, not JTable.
DrLaszloJamfa at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 9
Yeah, your question is about which layout manager to use. Describe your problem over in the swing forum and it'll take camickr about 3 seconds to answer.
hunter9000a at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 10
> Sounds likes a job for LayoutManagers, not JTable.And in either case the answer to "How do I...?" is "Come back after you read the tutorial with an answerable question."
DrClapa at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 11
srry it doesn't help, all my stuff scattered throughout the Frame
ichbinsterbena at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 12
> srry it doesn't help, all my stuff scattered> throughout the FrameWhat layout manager are you using?
DrLaszloJamfa at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 13
right now GridLayout
ichbinsterbena at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 14
> right now GridLayoutGridLayout has the advantage that it is simple, but it makes each cell the same sizeand stretches each component to fill its cell. Perhaps you require GridBagLayout,or you need to nest layouts.
DrLaszloJamfa at 2007-7-12 2:44:48 > top of Java-index,Java Essentials,Java Programming...
# 15
does GridBagLayout let me tell it where to go?
ichbinsterbena at 2007-7-21 20:27:18 > top of Java-index,Java Essentials,Java Programming...
# 16
> does GridBagLayout let me tell it where to go?Yes, via constraints. Take the tutorial: http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html
DrLaszloJamfa at 2007-7-21 20:27:18 > top of Java-index,Java Essentials,Java Programming...
# 17
Thanks , that helped a bunch.
ichbinsterbena at 2007-7-21 20:27:18 > top of Java-index,Java Essentials,Java Programming...