Audio Player: Fenster mit Play/Stop-Button erstellen, mit JSlider Lautstärke ändern

xion63

Mitglied
Hi,
ich will einen Clip Player mit einem Button erstellen. Es wird aber kein Fenster angezeigt und ich weiß nicht wieso. Ich höre immer nur den Clip. Die Buttons sind erstmal egal.

Habe in Zeile 31 ein JFrame erzeugt. Aber das funktioniert nicht.


Hier der komplette Code.

Java:
import java.awt.BorderLayout;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.Control;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JFrame;

/**
 * Simple clip player that opens and starts an audio clip.
 */
public class SimpleClipPlayer extends Thread {
	/** Audio clip */
	Clip clip;
	
	
	/**
	 * Constructor which loads a given audio clip. 
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	public SimpleClipPlayer(URL clipFile, int nLoopCount) {
		
		JFrame f = new JFrame();
		f.setTitle("My Simple Clip Player");
		f.setSize(750,525);
		//f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setLayout(new BorderLayout());

		
		
		loadAudioFile(clipFile, nLoopCount);
	}
	
	/**
	 * Loads an audio file from the Internet and plays it in a loop
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	private void loadAudioFile(URL clipFile, int nLoopCount) {
		
		try {			
			// create a stream from the file
			AudioInputStream stream = AudioSystem.getAudioInputStream(clipFile);

			// create info object
			DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat());
			
			// create and open clip
			clip = (Clip)AudioSystem.getLine(info);
			clip.open(stream);
			
			// print supported controls
			this.printSupportedControls();

			// set balance
			this.setPanOrBalance(+1);
			
			// tell the clip to loop
			clip.loop(nLoopCount);
			
		} catch (UnsupportedAudioFileException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (LineUnavailableException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Prints a list of all supported controls to the command line
	 */
	private void printSupportedControls() {
		// get array of controls of the clip
		Control[] controls = clip.getControls();
		
		// print a list of all controls
		for (Control control : controls) {
			System.out.println(control.getType());
		}
	}
	
	/**
	 * Sets the balance or pan of the audio clip depending on the 
	 * control that is supported (pan for mono, balance for stereo).
	 * @param balance value from -1 (only left) to 1 (only right)
	 */
	private void setPanOrBalance(float balance) {
		// check if balance control is supported
		if(clip.isControlSupported(FloatControl.Type.BALANCE)) {
			
			// get balance control
			FloatControl balanceCtrl = (FloatControl)clip.getControl(FloatControl.Type.BALANCE);
				
			// adjust balance
			balanceCtrl.setValue(balance);
		}
		else {
			System.out.println("No balance control available!");
			// BALANCE control is only for stereo. 
			// The equivalent for mono is PAN, so try PAN:
			if(clip.isControlSupported(FloatControl.Type.PAN)) {

				// get balance control
				FloatControl panCtrl = (FloatControl)clip.getControl(FloatControl.Type.PAN);
					
				// adjust balance
				panCtrl.setValue(balance);
			}
			else {
				System.out.println("No pan control available!");
			}
		}	
	}
	
	/**
	 * Starts the clip and stops it after a given number of loops.
	 */
	public void run(){
		//clip.loop(Clip.LOOP_CONTINUOUSLY);
		
		// start the clip
		clip.start();
		
		// do nothing while clip is active
		while (clip.isActive()){}
		
		// stop the clip
		clip.stop();
	}
	
	/**
	 * Creates a new ClipPlayer object for a specific audio clip.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			// define URL of the audio clip
			URL url = new URL(
					"http://freewavesamples.com/files/Alesis-Fusion-Bass-Loop.wav"); 
			
			// define the number of times the audio clip should be played 
			int nLoopCount = 3;
			
			// create a new clipPlayer object
			SimpleClipPlayer clipPlayer = new SimpleClipPlayer(url, nLoopCount);
			
			// start clip
	    	clipPlayer.start();
			
			/* 
			 * JSRessources: 
			 * In the JDK 5.0, the program would exit if we leave the main loop here. 
			 * This is because all Java Sound threads have been changed to be daemon threads, 
			 * not preventing the VM from exiting (this was not the case in 1.4.2 and earlier). 
			 * So we have to stay in a loop to prevent exiting here.
			 */
			while (true) {
				// sleep for 1 second.
				try {
					Thread.sleep(1000);
				}
				catch (InterruptedException e) {
					// Ignore the exception.
				}
			}
			
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}
}


Wäre dankbar wenn mir jemand erklärt wie ich hier ein Fenster erzeugen kann.
 
Zuletzt bearbeitet:

xion63

Mitglied
DANKE!!:D

Jetz hab ich nen Button erstellt. Beim anklicken soll der Clip abgespielt werden und wenn man ihn nochmal anklickt soll der Clip wieder stoppen. Das stoppen funktioniert, aber der Clip fängt automatisch an, ohne den Button anzuklicken.

Java:
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.Control;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;

/**
 * Simple clip player that opens and starts an audio clip.
 */
public class SimpleClipPlayer extends Thread implements ActionListener {
	/** Audio clip */
	Clip clip;
	private JButton playstopButton;
	private JPanel panel_1;
	private boolean playstop = false;
	
	
	/**
	 * Constructor which loads a given audio clip. 
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	public SimpleClipPlayer(URL clipFile, int nLoopCount) {
		
		JFrame f = new JFrame();
		f.setTitle("My Simple Clip Player");
		f.setSize(750,525);
		//f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setLayout(new BorderLayout());
		f.setVisible(true);
		
		
		//Panel erstellen
		panel_1 = new JPanel();
		panel_1.setLayout(new FlowLayout());
		f.add(panel_1);
		// Button erstellen
		playstopButton = new JButton("Play");
		panel_1.add(playstopButton);
		playstopButton.addActionListener(this);

		
		
		loadAudioFile(clipFile, nLoopCount);
	}
	
	/**
	 * Loads an audio file from the Internet and plays it in a loop
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	private void loadAudioFile(URL clipFile, int nLoopCount) {
		
		try {			
			// create a stream from the file
			AudioInputStream stream = AudioSystem.getAudioInputStream(clipFile);

			// create info object
			DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat());
			
			// create and open clip
			clip = (Clip)AudioSystem.getLine(info);
			clip.open(stream);
			
			// print supported controls
			this.printSupportedControls();

			// set balance
			this.setPanOrBalance(+1);
			
			// tell the clip to loop
			clip.loop(nLoopCount);
			
		} catch (UnsupportedAudioFileException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (LineUnavailableException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Prints a list of all supported controls to the command line
	 */
	private void printSupportedControls() {
		// get array of controls of the clip
		Control[] controls = clip.getControls();
		
		// print a list of all controls
		for (Control control : controls) {
			System.out.println(control.getType());
		}
	}
	
	/**
	 * Sets the balance or pan of the audio clip depending on the 
	 * control that is supported (pan for mono, balance for stereo).
	 * @param balance value from -1 (only left) to 1 (only right)
	 */
	private void setPanOrBalance(float balance) {
		// check if balance control is supported
		if(clip.isControlSupported(FloatControl.Type.BALANCE)) {
			
			// get balance control
			FloatControl balanceCtrl = (FloatControl)clip.getControl(FloatControl.Type.BALANCE);
				
			// adjust balance
			balanceCtrl.setValue(balance);
		}
		else {
			System.out.println("No balance control available!");
			// BALANCE control is only for stereo. 
			// The equivalent for mono is PAN, so try PAN:
			if(clip.isControlSupported(FloatControl.Type.PAN)) {

				// get balance control
				FloatControl panCtrl = (FloatControl)clip.getControl(FloatControl.Type.PAN);
					
				// adjust balance
				panCtrl.setValue(balance);
			}
			else {
				System.out.println("No pan control available!");
			}
		}	
	}
	
	/**
	 * Starts the clip and stops it after a given number of loops.
	 */
/*	public void run(){
		//clip.loop(Clip.LOOP_CONTINUOUSLY);
		
		// start the clip
	//	clip.start();
		
		// do nothing while clip is active
	//	while (clip.isActive()){}
		
		// stop the clip
	//	clip.stop();
	}
	
	/**
	 * Creates a new ClipPlayer object for a specific audio clip.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			// define URL of the audio clip
			URL url = new URL(
					"http://freewavesamples.com/files/Alesis-Fusion-Bass-Loop.wav"); 
			
			// define the number of times the audio clip should be played 
			int nLoopCount = 3;
			
			// create a new clipPlayer object
			SimpleClipPlayer clipPlayer = new SimpleClipPlayer(url, nLoopCount);
			
			// start clip
	//    	clipPlayer.start();
			
			/* 
			 * JSRessources: 
			 * In the JDK 5.0, the program would exit if we leave the main loop here. 
			 * This is because all Java Sound threads have been changed to be daemon threads, 
			 * not preventing the VM from exiting (this was not the case in 1.4.2 and earlier). 
			 * So we have to stay in a loop to prevent exiting here.
			 */
			while (true) {
				// sleep for 1 second.
				try {
					Thread.sleep(1000);
				}
				catch (InterruptedException e) {
					// Ignore the exception.
				}
			}
			
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}
	
	
	public void actionPerformed(ActionEvent event) {
		String cmd = event.getActionCommand();
		if (cmd.equals("Play"))
		{
			if (playstop == false)
			{
				clip.start();	
				playstop = true;
			}
			else
			{
				clip.stop();
				playstop = false;
			}
		}
	}
	
	
	
}
 

eRaaaa

Top Contributor
Liegt wohl am Aufruf:
[c] clip.loop(nLoopCount);[/c]

-->
Starts looping playback from the current position. Playback will
continue to the loop's end point, then loop back to the loop start point
<code>count</code> times, and finally continue playback to the end of
the clip.[...]
 

xion63

Mitglied
vom optischen bin ich jetzt schon mal ganz zufrieden. Aber wie kann ich die Lautstärke mit einem JSlider ändern. Und was ist der Unterschied zwischen MASTER_GAIN und VOLUME. Soweit ich das sehe ist MASTER_GAIN globaler. Müsste aber egal sein welches ich nehme.


Java:
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Dictionary;
import java.util.Hashtable;

import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.Clip;
import javax.sound.sampled.Control;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.FloatControl;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.SourceDataLine;
import javax.sound.sampled.UnsupportedAudioFileException;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSlider;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

/**
 * Simple clip player that opens and starts an audio clip.
 */
public class SimpleClipPlayer extends Thread implements ActionListener, ChangeListener {
	/** Audio clip */
	Clip clip;
	private JButton playstopButton;
	private JPanel panel_1;
	private boolean playstop = false;
	
	
	/**
	 * Constructor which loads a given audio clip. 
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	public SimpleClipPlayer(URL clipFile, int nLoopCount) {
		
		JFrame f = new JFrame();
		f.setTitle("My Simple Clip Player");
		f.setSize(750,525);
		//f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setLayout(new BorderLayout());
		f.setVisible(true);
		
		
		//Panel erstellen
		panel_1 = new JPanel();
		panel_1.setLayout(new FlowLayout());
		f.add(panel_1);
		
		// Button erstellen
		playstopButton = new JButton("Play");
		panel_1.add(playstopButton);
		playstopButton.addActionListener(this);
		
		// Slider für Sample Rate erstellen
		JSlider slider1;
		slider1 = new JSlider();
		slider1.setBorder(BorderFactory.createTitledBorder("Sample Rate"));
		slider1.setPaintTicks(true);
		slider1.setMajorTickSpacing(25);
		slider1.setMinorTickSpacing(5);
		slider1.setPaintLabels(true);
		Hashtable table = new Hashtable(); // Label überschreiben
		table.put(0, new JLabel("1/4")); 	// "0" mit "1/4" überschreiben
		table.put(25, new JLabel("1/2")); 	// "25" mit "1/2" überschreiben
		table.put(50, new JLabel("1"));		// "50" mit "1" überschreiben
		table.put(75, new JLabel("2"));		// "75" mit "2" überschreiben
		table.put(100, new JLabel("4"));	// "100" mit "4" überschreiben	
		slider1.setLabelTable(table);	
		slider1.addChangeListener(this);
		
		panel_1.add(slider1);		
			
		// Slider für Volume erstellen
		JSlider slider2;
		slider2 = new JSlider(0,100,25);
		slider2.setBorder(BorderFactory.createTitledBorder("Volume"));
		slider2.setPaintTicks(true);
		slider2.setMajorTickSpacing(50);
		slider2.setMinorTickSpacing(5);
		slider2.setPaintLabels(true);
		panel_1.add(slider2);
		
		

		
		
		loadAudioFile(clipFile, nLoopCount);
	}
	
	/**
	 * Loads an audio file from the Internet and plays it in a loop
	 * @param clipFile audio file
	 * @param nLoopCount number of times to loop
	 */
	private void loadAudioFile(URL clipFile, int nLoopCount) {
		
		try {			
			// create a stream from the file
			AudioInputStream stream = AudioSystem.getAudioInputStream(clipFile);

			// create info object
			DataLine.Info info = new DataLine.Info(Clip.class, stream.getFormat());
			
			// create and open clip
			clip = (Clip)AudioSystem.getLine(info);
			clip.open(stream);
			
			// print supported controls
			this.printSupportedControls();

			// set balance
			this.setPanOrBalance(+1);
			
			// tell the clip to loop
//			clip.loop(nLoopCount);
			
		} catch (UnsupportedAudioFileException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (LineUnavailableException e) {
			e.printStackTrace();
		}
	}
	
	/**
	 * Prints a list of all supported controls to the command line
	 */
	private void printSupportedControls() {
		// get array of controls of the clip
		Control[] controls = clip.getControls();
		
		// print a list of all controls
		for (Control control : controls) {
			System.out.println(control.getType());
		}
	}
	
	/**
	 * Sets the balance or pan of the audio clip depending on the 
	 * control that is supported (pan for mono, balance for stereo).
	 * @param balance value from -1 (only left) to 1 (only right)
	 */
	private void setPanOrBalance(float balance) {
		// check if balance control is supported
		if(clip.isControlSupported(FloatControl.Type.BALANCE)) {
			
			// get balance control
			FloatControl balanceCtrl = (FloatControl)clip.getControl(FloatControl.Type.BALANCE);
				
			// adjust balance
			balanceCtrl.setValue(balance);
		}
		else {
			System.out.println("No balance control available!");
			// BALANCE control is only for stereo. 
			// The equivalent for mono is PAN, so try PAN:
			if(clip.isControlSupported(FloatControl.Type.PAN)) {

				// get balance control
				FloatControl panCtrl = (FloatControl)clip.getControl(FloatControl.Type.PAN);
					
				// adjust balance
				panCtrl.setValue(balance);
			}
			else {
				System.out.println("No pan control available!");
			}
		}	
	}
	
	/**
	 * Starts the clip and stops it after a given number of loops.
	 */
/*	public void run(){
		//clip.loop(Clip.LOOP_CONTINUOUSLY);
		
		// start the clip
	//	clip.start();
		
		// do nothing while clip is active
	//	while (clip.isActive()){}
		
		// stop the clip
	//	clip.stop();
	}
	
	/**
	 * Creates a new ClipPlayer object for a specific audio clip.
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			// define URL of the audio clip
			URL url = new URL(
					"http://freewavesamples.com/files/Alesis-Fusion-Bass-Loop.wav"); 
			
			// define the number of times the audio clip should be played 
			int nLoopCount = 3;
			
			// create a new clipPlayer object
			SimpleClipPlayer clipPlayer = new SimpleClipPlayer(url, nLoopCount);
			
			// start clip
	//    	clipPlayer.start();
			
			/* 
			 * JSRessources: 
			 * In the JDK 5.0, the program would exit if we leave the main loop here. 
			 * This is because all Java Sound threads have been changed to be daemon threads, 
			 * not preventing the VM from exiting (this was not the case in 1.4.2 and earlier). 
			 * So we have to stay in a loop to prevent exiting here.
			 */
			while (true) {
				// sleep for 1 second.
				try {
					Thread.sleep(1000);
				}
				catch (InterruptedException e) {
					// Ignore the exception.
				}
			}
			
		} catch (MalformedURLException e) {
			e.printStackTrace();
		}
	}
	
	
	public void actionPerformed(ActionEvent event) {
		String cmd = event.getActionCommand();
		if (cmd.equals("Play"))
		{
			if (playstop == false)
			{
				clip.start();	
				clip.loop(Clip.LOOP_CONTINUOUSLY);
				playstop = true;
			}
			else
			{
				clip.stop();
				playstop = false;
			}
		}
	}

	@Override
	public void stateChanged(ChangeEvent e) {
		// TODO Auto-generated method stub
		SourceDataLine line;
		FloatControl control = (FloatControl) line.getControl(FloatControl.Type.VOLUME);
		control.setValue(slider2);
		
	}
	
	
	
}


wär für einen kleinen Tipp dankbar
 

eRaaaa

Top Contributor
Ok, erstmal ein paar allgemeine Dinge:

- Wenn du willst das Slider2 das Volume regelt und somit auch stateChanged benutzt, musst du natürlich den Listener auch an slider2 registrieren, nicht an slider1 :)

- wenn du in stateChanged auf slider2 zugreifen möchtest, solltest du slider2 nicht als lokale Variable im Konsturktor deklarieren...(oder eben in stateChanged nicht auf slider2 versuchen zuzugreifen, sondern e.getSource() )

- setVisible(true) am Besten immer zum Schluss aufrufen(nachdem alle Komponenten hinzugefügt wurden etc.)


So jetzt zum stateCHanged bzw. zu deinem volume-Problem:

Wirklich eine große Hilfe bin ich da jetzt nicht, da ich noch nie wirklich mit diesen Audioclips gearbeitet habe, aber ich meine mich erinnern zu können, das man da ein wenig umrechnen muss, d.h. setValue(100) ist nicht gleich 100% usw..wie genau das geht findest du aber sicherlich hier im Forum, was ich aber auf jeden Fall sagen kann ist, dass das so schon mal nicht gehen kann. "line" kommt ja nicht aus dem Himmel angeflogen und initialisiert sich da einfach *g*
Wahrscheinlich eher so etwas:
Java:
       FloatControl control = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);
        control.setValue(slider2.getValue());

wobei wie ich schon sagte höchstwahrscheinlich Probleme geben wird mit dem Wertebereich!
Einfahc mal diesbezüglich die Forensuche benutzen...
 
Ähnliche Java Themen
  Titel Forum Antworten Datum
D Audio Player Progress Slider nicht flüssig AWT, Swing, JavaFX & SWT 2
J Ich kriege eine Fehler Messesage bei meinem Media Player AWT, Swing, JavaFX & SWT 8
M JavaFX Wie füge ich zu einer WebEngine einen Flash Player hinzu AWT, Swing, JavaFX & SWT 3
B VLC Player in JavaFX öffnen AWT, Swing, JavaFX & SWT 7
B Play Button auch als Stop Button benutzen, MP3 Player AWT, Swing, JavaFX & SWT 7
R einfacher mp3 player AWT, Swing, JavaFX & SWT 18
multiholle Oberfläche MP3-Player AWT, Swing, JavaFX & SWT 2
G JMF-Player AWT, Swing, JavaFX & SWT 4
D JSlider und JMF player verbinden AWT, Swing, JavaFX & SWT 6
D JMF Player probleme AWT, Swing, JavaFX & SWT 2
T Programm gleich wie Windows Media Player in den Task geben AWT, Swing, JavaFX & SWT 10
S Nochmal GUI mit JMF Player AWT, Swing, JavaFX & SWT 13
S JMF Player Problem AWT, Swing, JavaFX & SWT 3
J Java-Player AWT, Swing, JavaFX & SWT 16
G Probleme mit MP3-Player AWT, Swing, JavaFX & SWT 4
M suche geeignetes Fenster zur Anzeige AWT, Swing, JavaFX & SWT 49
berserkerdq2 Kann ich ein Rechteck mittig im Fenster halten, egal wie ich die Bildschirmgröße verändere? AWT, Swing, JavaFX & SWT 3
W 2 JTables in einem Swing-Fenster? AWT, Swing, JavaFX & SWT 5
berserkerdq2 Wie füge ich ein Bild in javafx mit dem Scenebuilder ein, das automatisch mitgezogen wird, wenn das Fenster vergrößert wird oder Vollbildmodus AWT, Swing, JavaFX & SWT 6
TheSepp Fenster um x Pixel bewegen, wenn man auf dem Knopf drückt AWT, Swing, JavaFX & SWT 10
J JavaFx PDF in einem Element in einem Fenster anzeigen. AWT, Swing, JavaFX & SWT 11
K JavaFX unterschiedliche (mehrere Fenster) in seperater Main Methode AWT, Swing, JavaFX & SWT 26
_user_q Kann man ein 2. JavaFX-Fenster auch beenden (exit) statt schließen (close) lassen? AWT, Swing, JavaFX & SWT 8
L Swing Files abspeichern mit Save as Dialog Fenster AWT, Swing, JavaFX & SWT 5
OZAN86 einfaches Fenster öffnen scheitert AWT, Swing, JavaFX & SWT 18
G Zuletzt aktives Fenster, vor dem aktuell aktiven AWT, Swing, JavaFX & SWT 2
sserio Kann man bei JavaFx ein Fenster aufkommen lassen? AWT, Swing, JavaFX & SWT 1
Z GUI Forms - Mehrere Fenster in einem Projekt AWT, Swing, JavaFX & SWT 18
S Swing Alles beenden bei Fenster mit Scroll-Balken AWT, Swing, JavaFX & SWT 6
CptK windowClosed() nur aufrufen, wenn Fenster nicht über Button geschlossen wird AWT, Swing, JavaFX & SWT 1
W Zweites/neues Fenster durch Button öffnen AWT, Swing, JavaFX & SWT 6
CptK Fokus auf geöffnetes Zweit-Fenster setzen und Eingaben außerhalb blocken AWT, Swing, JavaFX & SWT 2
B Text mit Absatz + OK-Button, der Fenster wieder schließt AWT, Swing, JavaFX & SWT 7
MiMa JavaFX Fenster in JavaFX öffnen Schliessen (Initialisierung) AWT, Swing, JavaFX & SWT 20
N Kontextmenü (Popup-Fenster) erstellen AWT, Swing, JavaFX & SWT 3
L Hintergrundbild im Fenster darstellen AWT, Swing, JavaFX & SWT 9
P JavaFX Fenster wird nicht angezeigt (Mac) AWT, Swing, JavaFX & SWT 13
VPChief Buttons Reagieren erst wenn ich Fenster minimiere AWT, Swing, JavaFX & SWT 4
B JavaFX TextField Eingabe in neues Fenster übernehmen AWT, Swing, JavaFX & SWT 4
N Drag and Drop Fenster AWT, Swing, JavaFX & SWT 11
A Swing JTextField an Button übergeben für Popup-Fenster funktioniert nicht AWT, Swing, JavaFX & SWT 3
P JavaFX Zugriff auf Fenster/Layout-Container in eigenen Klassen AWT, Swing, JavaFX & SWT 5
Bluedaishi JavaFX Programm start mit zwei scenen bzw Fenster AWT, Swing, JavaFX & SWT 1
J Fenster mit Inhalten aus einem Array Füllen AWT, Swing, JavaFX & SWT 4
S Swing Fenster State Machine AWT, Swing, JavaFX & SWT 1
A Fenster genau unterhalb von JTextField anzeigen AWT, Swing, JavaFX & SWT 1
J Overlay Panel statt neues Fenster AWT, Swing, JavaFX & SWT 6
S Swing Bei start des Programmes kein Fenster zu sehen AWT, Swing, JavaFX & SWT 1
X Neues Fenster mit Button öffnen und bearbeiten AWT, Swing, JavaFX & SWT 4
platofan23 JAVAFX zweites Fenster öffnen AWT, Swing, JavaFX & SWT 2
M JavaFX Altes Fenster (FXML Datei) löschen AWT, Swing, JavaFX & SWT 16
P JavaFX Fenster lädt nicht mehr AWT, Swing, JavaFX & SWT 4
I AWT Listener während man in anderem Fenster ist AWT, Swing, JavaFX & SWT 4
S JavaFX Fenster aufkommen lassen, wenn mit der Maus über bestimmten Bereich fahren AWT, Swing, JavaFX & SWT 1
L Java- UI zweites Fenster aus einer anderen Klasse öffnen durch ButtonClick AWT, Swing, JavaFX & SWT 4
D Swing Neues (3.) Fenster öffnen AWT, Swing, JavaFX & SWT 2
G JavaFX Fenster 1 Array übertragen zur Fenster 2 AWT, Swing, JavaFX & SWT 0
I JavaFX Fenster wird auf einem anderen Rechner anders dargestellt AWT, Swing, JavaFX & SWT 5
K Fenster welches den Sieger anzeigt AWT, Swing, JavaFX & SWT 5
O JavaFX Fenster scließen AWT, Swing, JavaFX & SWT 4
A Swing Fenster ändert Position bei Mausklick nicht AWT, Swing, JavaFX & SWT 2
S SWT neues Fenster, buttons aus alten etc... AWT, Swing, JavaFX & SWT 0
D Java FXML mehrere Fenster AWT, Swing, JavaFX & SWT 4
L Input aus Sub-Fenster Startfenster übergeben AWT, Swing, JavaFX & SWT 5
B AWT Fenster schließt nicht AWT, Swing, JavaFX & SWT 2
H JavaFX Kriege fehler beim Fenster wechseln AWT, Swing, JavaFX & SWT 7
G Swing Wenn ich mein JFrame Fenster vergrößere die Inhalte anpassen AWT, Swing, JavaFX & SWT 1
U Swing Inhalt vom Fenster wird erst durch Hovern oder Klicken sichtbar AWT, Swing, JavaFX & SWT 3
A Nach klick auf Button neuen Inhalt im gleichen Fenster AWT, Swing, JavaFX & SWT 3
T Fenster schließen AWT, Swing, JavaFX & SWT 4
K JavaFX ObservableList + Fenster AWT, Swing, JavaFX & SWT 6
windl Transparentes / halbtransparentes Fenster AWT, Swing, JavaFX & SWT 1
K Fenster mittig im Vollbildschirm - ok, aber ... AWT, Swing, JavaFX & SWT 2
N Swing Sorry nicht mal ein Fenster öffnen... AWT, Swing, JavaFX & SWT 19
S actionlistener mit 2 fenster integrieren AWT, Swing, JavaFX & SWT 11
G Event Handling TableView daten in ein neues Fenster herauslesen? AWT, Swing, JavaFX & SWT 3
C Benutzername in GUI eingeben und nach Spiel neues Fenster Benutzername wieder anzeigen AWT, Swing, JavaFX & SWT 1
C Durch klicken von Button neues Fenster oeffnen AWT, Swing, JavaFX & SWT 18
D JavaFX (WebStart) Graues Fenster beim Start AWT, Swing, JavaFX & SWT 4
J Button vergrößert sich bei Fenster resize AWT, Swing, JavaFX & SWT 22
L Zweites Fenster mit Thread AWT, Swing, JavaFX & SWT 0
Paul15 Zwei Fenster AWT, Swing, JavaFX & SWT 23
T LayoutManager Methode, um Bildschirm(fenster) für Aktualisierungen zu blockieren bzw. freizugeben gesucht AWT, Swing, JavaFX & SWT 2
C AWT Problem mit Protokol Fenster AWT, Swing, JavaFX & SWT 0
L Daten in neuem Fenster AWT, Swing, JavaFX & SWT 2
D Mit Klick auf Button ein neues Fenster erzeugen AWT, Swing, JavaFX & SWT 11
I JTable: Doppelklick auf Table soll neues Fenster öffnen und Daten aus JTable anzeigen AWT, Swing, JavaFX & SWT 4
A Swing Textübergabe innerhalb der Anwendung in unterschiedlichen Fenster AWT, Swing, JavaFX & SWT 8
wolfgang63 JavaFX Animation, Kreise im vorgegebem Takt durchs Fenster laufen lassen AWT, Swing, JavaFX & SWT 3
K Java Button öffnet neues Fenster AWT, Swing, JavaFX & SWT 5
Z Fenster leer, wenn ich ein JTextField erzeuge AWT, Swing, JavaFX & SWT 3
W Swing JScrollPane für mein Fenster AWT, Swing, JavaFX & SWT 4
X Swing 2 Fenster (1 im Vordergrund) AWT, Swing, JavaFX & SWT 6
X Swing Ein neues Fenster öffen aber ohne ein extra Prozess zu starten AWT, Swing, JavaFX & SWT 1
T JavaFX ControlsFX-Notification öffnet nicht wenn kein JavaFX-Fenster offen. AWT, Swing, JavaFX & SWT 1
E JavaFX JavaFX Fenster nicht schließen AWT, Swing, JavaFX & SWT 4
K JavaFX Fenster aufrufen über Menü AWT, Swing, JavaFX & SWT 1
thet1983 offne Fenster gemeinsam schließen AWT, Swing, JavaFX & SWT 8
H AWT Fenster- und JLabel-Größe automatisch anpassen AWT, Swing, JavaFX & SWT 2
Z JSlider im Modalen-Fenster AWT, Swing, JavaFX & SWT 0

Ähnliche Java Themen

Neue Themen


Oben