• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Screen resolution

 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application gui needs atleast 900/700 to run. Is that ok? What to do? Otherwise my table headers look wierd.
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:
I had this problem too. I changed column name used short name, such as:

Now I have size of 790X400. It is OK, does not look too big.
-Bal
 
Leonardo Wang
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another way to solve this is that the table header can be displayed in two rows if you use the following String as the header:
<html> <font size=2 face=\"Arial\"><body><center><p>Flight<br>Number </body></html>
This string will be intepreted on screeen as:
Flight
Number
So the table will not be that long. We use this way in our products.
Leon
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aaah, now you folks are working under the assumption that the column names will always be the same. I am trying to avoid that if I can.
Thanks for the responses.
 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Aaah, now you folks are working under the assumption...
Of course, it is my assumption. Even I have documented this fact in design choices stating to read them as This application will not run if the database schema is not same as supplied by the SUN.
Buddy, I cannot give them more than what they wanted? It is not a fault less enterprise application. It is just a Java 2 Developer assignment to get ceritfied. May be we differ on this issue how to look at it?
-Bal
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are ways to deal with this problem. You can write your own renderer which deals with splitting the lenghty column names in to more tnan one line, or resize the column size to the size of the column name (current font) and have the horizontal scroll bar activated. Or, use BreakIterator, to break the column name dynamically and use HTML to represent the name.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the response guys. Yeah Bal, our approaches here are different. It destroys some assumptions about my client flexibility if I hard code the column name changes and I really dont want to do that. Your approach is a valid one no doubt. In the real word, infact in an application I work with, we supply the database headers locally. For example a database table header name maybe REC_NO or something, and we surely dont want to display that. The only trade of is that as and when the schema changes, we need to change the headers. I am trying avoid this issue and get some brownie points . I guess I will have to live with the larger screen size and say that I support only 1024x768. This is my short coming but a design choice. ..
God bless us all.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Figured a way around my problem. If you see all the columns when normally placed take up far more space than required. Forexample, the day column takes up far more place than required. I use only the size that is required and now the view looks fine. Thanks all.
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kalichar- You are going against your own concern, which made us think and answer. You settled for something which you intially tried to avoid !!!.nn
Good luck.
 
Kalichar Rangantittu
Ranch Hand
Posts: 240
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No rajesh, I am still doing what I was hoping to do. You see once you are connected you can determine the lenght of the field header and also the maximum lenght the data supported by the column. I use the greater of the two to size my columns correctly. So for example if I have a column header called Available Seats, I know the lenght of the column header, I also know the maximum length in characters of the column though field Info. I therefore set the width of the
Available Seats column to the greater of the two.
By doing so, each column will be provided the width is requires only.
Thanks a lot for all your input. I would have definitely changed my design to yours or Bal's if the above solution hadnt fixed my problem and providing a scheme that will easily allow changes to the database headers without effecting my client. Enjoy bud and good luck.
 
Rajesh Matti
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kalichar - Probably I misunderstood your requirement. I was thinking that you wanted a way to dynamically wrap the column header while maintaining its meaning.
Anyway, your are doing fine.
 
Kenny
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about making the use of scrollbars in a scroll pane for the table when the view area of the columns increases the table viewport width
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic