This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Data File Schema

 
Payal Shah
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 759
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..?
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic