Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
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
Medium Priority
?
204 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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 2000 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 2000 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

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Question has a verified solution.

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

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

564 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