Solved

Jave web component that can display data from a database, (like .NET's DataGrid) that can lock the first column so when you scroll right all the columns scroll but the first.

Posted on 2004-08-25
12
191 Views
Last Modified: 2010-03-31
Java web component that can display data from a database, (like .NET's DataGrid) that can lock the first column so when you scroll right all the columns scroll but the first.

For example. Column 1 has name and the rest of the columns are data about a person so when you scrool to the right you would want the name column to stay in view to the user while they look at the other data.

I am looking for a solution for jsp and javascript.

Code examples are welcomed.
0
Comment
Question by:gillgates
  • 6
  • 3
  • 3
12 Comments
 
LVL 15

Expert Comment

by:Javatm
ID: 11898679
Hi Friend;

Think this is what you need, An example of creating a table from a database in JSP :
http://webdesign.ittoolbox.com/groups/groups.asp?v=java-l&i=529362

Hope that helps . . .
Javatm
0
 
LVL 3

Author Comment

by:gillgates
ID: 11898694
Hello,

I don't think that is what I am looking for... I want an object that has its own scroll bars and not the pages.  So you scroll with the object and the first column (or whatever column I say) doesn't move but the other do.

0
 
LVL 15

Expert Comment

by:Javatm
ID: 11898716
Sorry that one was bogus . . .

Accessing Database through JSP :
http://java.sun.com/developer/qow/archive/73/index.html

Here is the correct one. An example of creating a table using servlets :
http://www.stardeveloper.com:8080/articles/display.html?article=2001062501&page=1

Here is another helpfull J2EE Tutorial :
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Hope that helps . . .
Javatm
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 3

Author Comment

by:gillgates
ID: 11899194
I already know hot to access a database in java.  I am asking for the existance of an object that has its own scroll bars and not the pages.  So you scroll with the object and the first column (or whatever column I say) doesn't move but the other do.
0
 
LVL 3

Author Comment

by:gillgates
ID: 11909886
Anyone understand what I am talking about?  I am increasing the point value.  150 -> 500
0
 
LVL 18

Accepted Solution

by:
armoghan earned 500 total points
ID: 11921288
I dont think that kind of DataGrid is present as a Java Web Component.
You may find a good DataGrid type of component if you are using an Applet.

But i dont think that there is any good component which can be added in your JSP pages
0
 
LVL 3

Author Comment

by:gillgates
ID: 11933199
armoghan

So if I used a java applet instead of jsp or javascript you think there would be a component?  You don't happen to know what component would do what I am asking?
0
 
LVL 15

Expert Comment

by:Javatm
ID: 11938044
> So if I used a java applet instead of jsp or javascript you think there would be a component?
A component that you can use for applet would be JTable.
0
 
LVL 3

Author Comment

by:gillgates
ID: 11938071
I checked http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.sun.api.doc/javax/swing/JTable.html and didn't see anything that would allow me to lock a column so it wouldn't scroll.
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 500 total points
ID: 11938385
Actually Scrolling is the property of JScrollPane.
if a table is placed inside the JScrollPane, then it gives the scrolling. So you cannot keep one columns of the Table not scrolling and others scrolling.
But you may be able to simulate it by using Two Tables. One over the other. One with scrolling and other without scrolling.
What you can do is when you press lock any column, create a table with that column only on the fly and place it exectly over the main tables's respective column, Now you will be able to scroll other columns, but not this one.

Hope it helps
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11938396
0
 
LVL 3

Author Comment

by:gillgates
ID: 11969280
I guess you can't do this... I will have to use two jtables...

Thanks for the help.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
hibernate jars 4 45
Problem to Alipay 10 48
how to debug htl and js pages 8 39
Selenium docs api java index 3 48
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question