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.

Problem mit JComboBox im JApplet

Empfohlene Antworten

Veröffentlicht

Folgendes:

Ich habe eine Oberfläche, die aus einem JApplet mit mehreren JPanel, die wiederum JPanel haben.

In einem dieser JPanel ist eine JComboBox.

Wenn diese allerdings angeklickt wird, öffnet sich diese nicht (Nur, wenn man die Maus gedrückt hält).

Ich habe eine andere JComboBox in einem JFrame. welche sich tadellos öffnen lässt.

Muss ich daher irgendetwqas bestimmtes beachten, wenn ich eine JComboBox in ein JApplet einfüge?

Anbei ein paar auszüge aus dem Quelltext:

 

cBox=new JComboBox();

        cBox.setPreferredSize(new Dimension(150, 25));

        cBox.setOpaque(true);

        cBox.addActionListener(act);

        cBox.setVisible(true);


        Town[] t=sqlClient.getTownArray(act.getUser().getName());

        String[] s=new String[t.length];

        for(int i=0; i<t.length; i++)

        {

        	s[i]=t[i].getName();

        	cBox.addItem(s[i]+" ("+t[i].getX()+"|"+t[i].getY()+")");

        }


        if(this.getComponentCount()<6)

        {

        this.add(panTop); //HIER IST this EIN JPanel, was dem JApplet hinzugefügt wurde

        this.add(Box.createHorizontalStrut(10));

        JPanel p=new JPanel();

        p.add(cBox);

        this.add(p);

        this.add(panLeft);

        this.add(Box.createHorizontalStrut(10));

        this.add(panRight);

Bearbeitet von ManuSchmanu

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.