carookee - group communication for you
Home / JavaForum / Swing + AWT
Infos   |   Features   |   Gold-Edition   |   Kundenservice   
java
  Übersicht
  Forum
Beginner
Java allgemein
JDBC
JNI
Networking
Online-Ressourcen
Swing + AWT
XML
Meckerecke
  Mitglieder
LOGIN





· Passwort vergessen
· Kostenlos anmelden
  Information
  Demo
  Features
  Im Vergleich
  Anmeldung
SUCHE
Beiträge, Foren oder Verfasser finden:
  Kundenservice
  Impressum
  Datenschutz
  AGB
Status
4.421 User online
0 User eingeloggt
 

Beiträge
   Antworten     Neuer Beitrag    

Beitrag 274 von 1460 (19%) |<   <   >   >|

Autor danio
Datum 08.09.03, 13:07
Betreff printing scale component


hello,

I have a problem while trying to print a JPanel with diffrent components on it . The problem is that my scale does not work with that panel . At bottom of page appear again the first component from the top of panel (this is after printing , not at previewer). I think that this is a jdk problem . I am not sure . This is my print code :

JPanel panel = (JPanel) pagePanels.elementAt(pageIndex);
Graphics2D g2 = (Graphics2D) g;
g2.translate( pf.getImageableX( ), pf.getImageableY( ) );
g2.setColor(Color.WHITE);

double yscale = (double) (pf.getImageableHeight( ) / (double)panel.getBounds( ).height),
xscale = (double) (pf.getImageableWidth( ) / (double)panel.getBounds( ).width);

if( yscale > 1.0 )
{ yscale = 1.0;
}
g2.scale( xscale, yscale);
panel.paint(g2);
return PAGE_EXISTS;


 Auf diesen Beitrag antworten
 Neuen Beitrag verfassen


|<   <   >   >|

                                                                                                                                                                                                                           

Impressum  · Datenschutz  · AGB  · Infos  · Presse
Ein modernes Forum: teamturn.com