• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

printing jtable

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all and thanks in advance.

I am trying to print a jTable, it seems there is a simple command
JTable.print(), if my table is called jTable1 then
jTable1.print(); should do it.

compiler does not agree and says cannot resolve symbol method. I have import
javax.swing.table.*; which should be sufficient to provide this method. No
doubt there is something terribly complicated that I am missing.

Cheers,

Jacques
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a 1.5 method. What version are you using? If you are
compiling on the command line, you can type:

$javac -J-version

$java -version
 
Jacques Chaurette
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah Ha I see, I am using SDK 1.4 for my applets. Is there a print method for 1.4?

Jacques
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ability to print tables was introduced in Java 1.5. There is nothing corresponding to it in Java 1.4. However, I am sure that if you search the web you can find some code that will print your table under Java 1.4.

I've worked with a comercial package that prints tables under both Java 1.4 and 1.5, although it does not work in applets (only applications). Its called the "Java Print Dialog Framework".
 
I think he's gonna try to grab my monkey. Do we have a monkey outfit for this tiny ad?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic