Plz Help Me -Printing JTable

Printing JTable without GridLines

Page 1 of 1

10 Replies - 1024 Views - Last Post: 23 September 2009 - 05:09 AM Rate Topic: -----

#1 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Plz Help Me -Printing JTable

Posted 16 September 2009 - 07:10 AM

Hi everyone

Does anyone know how to print a JTable without gridlines
Plz help
Thanks

HP
Is This A Good Question/Topic? 0
  • +

Replies To: Plz Help Me -Printing JTable

#2 nelson64  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 16 September 2009 - 07:15 AM

jTable1.setShowHorizontalLines(false);
jTable1.setShowVerticalLines(false);
Was This Post Helpful? 0
  • +
  • -

#3 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 16 September 2009 - 07:29 AM

View Postnelson64, on 16 Sep, 2009 - 06:15 AM, said:

jTable1.setShowHorizontalLines(false);
jTable1.setShowVerticalLines(false);

Thanks for your help.
If I use jTable1.setShowHorizontalLines(false) statement it will display the table without horizontal gridlines in the screen.I dont want to change my table on the screen.Only for the printing purpose I need to take the gridlines off.
Is there any way to do that?

Thanks
HP
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Plz Help Me -Printing JTable

Posted 16 September 2009 - 04:27 PM

Search the forum for "Printable" I have asked this question more than once and post code to print (on a printer) a JTable even if part of it is hidden vecause in a ScroolPane
Was This Post Helpful? 0
  • +
  • -

#5 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 17 September 2009 - 03:29 AM

View Postpbl, on 16 Sep, 2009 - 03:27 PM, said:

Search the forum for "Printable" I have asked this question more than once and post code to print (on a printer) a JTable even if part of it is hidden vecause in a ScroolPane

Sorry I couldn't find any code related to my question.
Do you know where it is?

HP
Was This Post Helpful? 0
  • +
  • -

#6 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Plz Help Me -Printing JTable

Posted 17 September 2009 - 03:59 PM

The topic title was more than obvious

http://www.dreaminco...mp;hl=printable
Was This Post Helpful? 0
  • +
  • -

#7 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 21 September 2009 - 06:57 AM

View Postpbl, on 17 Sep, 2009 - 02:59 PM, said:

The topic title was more than obvious

http://www.dreaminco...mp;hl=printable

Thanks for your help.
I have got a problem with your code.When I try to print my Table in Landscape(Orientaion) using using your code it still print the table in Portrait.I want to print my table in Landscape.
I am Printing my table without the table Headers.so I am getting an outline for my table.How do I print my table without the outline.

Thanks in advance

HP
Was This Post Helpful? 0
  • +
  • -

#8 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 22 September 2009 - 01:39 AM

Hi,
I have got a problem with printing the JTable.I am using Printmode Normal.The Table has got 30 columns.When I print them the last column in each page gets splitted.How do I stop this.I dont want to split the column.If the column doesnt have enough space it should move to the new page.It shouldnt split the colum.
Any Ideas how to do it?
Thanks in advance.

HP
Was This Post Helpful? 0
  • +
  • -

#9 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Plz Help Me -Printing JTable

Posted 22 September 2009 - 04:04 PM

Not a reason to start a new topic
Topic merged
The code I provide let you select if landcape or not a manage to do not split a column
Was This Post Helpful? 0
  • +
  • -

#10 HP_  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 16-September 09

Re: Plz Help Me -Printing JTable

Posted 23 September 2009 - 01:25 AM

View Postpbl, on 22 Sep, 2009 - 03:04 PM, said:

Not a reason to start a new topic
Topic merged
The code I provide let you select if landcape or not a manage to do not split a column

Sorry I didnt get you.Are you saying I can select the landscape orientation from printdialouge.
How do I print my Table in Landscpae using your code?

Thanks
HP
Was This Post Helpful? 0
  • +
  • -

#11 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8324
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Plz Help Me -Printing JTable

Posted 23 September 2009 - 05:09 AM

View PostHP_, on 23 Sep, 2009 - 12:25 AM, said:

View Postpbl, on 22 Sep, 2009 - 03:04 PM, said:

Not a reason to start a new topic
Topic merged
The code I provide let you select if landcape or not a manage to do not split a column

Sorry I didnt get you.Are you saying I can select the landscape orientation from printdialouge.
How do I print my Table in Landscpae using your code?

Thanks
HP


Told you to search for "printable" you couldn't found it and I had to do the search for you....

Now did you read the code ? Somewhere in the code there is that line

* @param pageFormat the size and orientation of the page being drawn
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1