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.

"Totale" Kontrolle über die Größe...

Empfohlene Antworten

Veröffentlicht

N'Abend und Hallo,

ich würde ganz gerne die Größe von JButton(s) festlegen, wie sie MIR gefällt und nicht, dass er die Größe des JPanel(s) annimmt, denn das sieht ganz schön bescheiden aus, bei großen Panels! Ich benutze das GridLayout und wollte nun fragen, ob ich ein anderes benutzen muss, oder wie dat funzt...

Ich habe es einfach mal mit <<JButton1.setSize(2,2)>> oder mit <<JButton1.setPrefferredSize(new Dimension(2,2))>> probiert aber vielleicht ja nur an falscher Stelle aufgerufen, nämlich im Kontruktor!?!

Bitte helft mir...

Hi!

ich wüßte nur das man in nem "NULL" - Layout (setLayout(null)) die Höhe und Breite und Koordinaten selbst bestimmen kann.

mit der Methode setBounds(x,y,w,h) kannst du deinen Button so vergrößern/positionieren wie du willst!

Gruß

Azrael

Ich hasse es, wenn es zu einfach ist... naja...

DANKE!

Befasse dich mal mit den verschiedenen LayoutManagern! Da findest du was du suchst. (GridBagLayout ...)

Peeter

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.