Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jLabel Bildgröße anpassen

Empfohlene Antworten

Hi, ich habe eine Frage.

Ich brauche Bilder von Euromünzen (10ct-2€) in groß und in klein.

Ich habe die Münzen im Internet gesucht, und die Auflösung bzw. Größe mit einem Bildbearbeitungsprogramm so verkleinert, dass es nun passt.

Nun wollte ich mir eigentlich die Arbeit sparen wieder die Größe anzupassen und hatte gehofft, dass es eine andere Möglichkeit gibt.

Hier der jetzige Code der die "großen" Grafiken nimmt:


tempicon = new ImageIcon("geld/"+dmuenzen[i]+"_g.gif");

iconsg[i]=new JLabel(); 

iconsg[i].setBounds(ty,tx,tempicon.getIconWidth(),tempicon.getIconHeight());

iconsg[i].setIcon(tempicon);


Also konkret zb:

tempicon = new ImageIcon("geld/0.2_g.gif");

iconsg[1]=new JLabel();

iconsg[1].setBounds(350,40,tempicon.getIconWidth(),tempicon.getIconHeight());

iconsg[1].setIcon(tempicon);

Gibt es eine Möglichkeit das "ImageIcon" zu formatieren oder das Label anzuweisen, die ihm zugeordnete Grafik zu skallieren?

Mfg

k, thx Klug******er :e@sy

Hatte nix gefunden mit meinen Suchworten.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.