我的問題是一個逆:Is there a way to only have the OK button in a JOptionPane showInputDialog (and no CANCEL button)? 一個解決方案,這是(如果我讀正確的),可以添加任意的JPanel,該實例的標籤。我的問題是我需要消息窗口中的JComboBox對象,並且(以解決Coffee_Table問題的相同方式)
public int dialog()
{
Form prompt = new Form(); // creates form
//dimensions
prompt.Width = 300;
prompt.Height = 125;
prompt.Text = "Adding Rows"; // title
Label amou