File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Data File Schema Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Data File Schema" Watch "Data File Schema" New topic

Data File Schema

Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
I am working on UrlyBird(1.2.3) and I have a question about data file schema. I read few posts saying that it is ok to hard code the header information.
I was able to read the header information from my file using the RandomAccess file object.
I am not sure how can I make schema reading dyanmic so when i create JTable later, I can read them dynamically. Is there a way?
Jeffry Kristianto Yanuar
Ranch Hand

Joined: Oct 01, 2007
Posts: 759
Hi Paul, welcome to JavaRanch.

To use JTable dynamically, you have to implements MVC pattern. It is covered on book titled "SCJD Exam with J2SE" by Apress.

You have to extend AbstractTableModel and implement all the abstract methods specifics to your needs.

Hope that will help you

Jeffry Kristianto Yanuar (Java Instructor)
SCJP 5.0, SCJA, SCJD (UrlyBird 1.3.2)
Payal Shah
Ranch Hand

Joined: Jul 10, 2006
Posts: 67
thanks for your reply.

one more question, the schema section of the exam, I am using hardcoded static final fields for size ( private static final int location = 64 .

Is there a way to make that dynamic..?
I agree. Here's the link:
subject: Data File Schema
It's not a secret anymore!