If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > newbe jtable questions

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-21-09, 12:11
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
newbe jtable questions

I'm learning Java and experimenting with jTable to display a hotel room booking system. I just have a few questions:
  • Can I put a newline in the column header? I've tried the following but it was ignored. I'd like this so I can reduce the width of each column.
    Code:
    mtblCalendar.addColumn( Sat\n2" );
  • Can I set a font size and or width for each column (I'm aiming to display a month or twos data across the screen). There is a tblCalendar.setRowHeight() function but I can't find a setColWidth() function. Or am I not looking hard enough?
  • Is it possible to print text across multiple cells ie row 1 cols 3 to 10 should show "Smith". At the moment I'm just using colour to denote if a room is booked but it would be nice to show the booking name. I can obviously print inside a single cell (a day in this system) but if I want the booking name to appear across a group of cells is that possible? I don't mind if the name gets truncated.
  • Is there a way to make the table scrollable so I could have the whole year available as the user moves the mouse to the edge of the screen.
  • I'm quite happy with jTable so far but would I be better with another class? I'll be trying to add clickable events and dragging and dropping of bookings, popup info etc.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On