jradiobutton

    1熱度

    1回答

    我想跟蹤按特定順序點擊的特定組件。 我使用和的getSource標誌是這樣的: public void actionPerformed(ActionEvent e) { JButton q = (JButton)e.getSource(); JRadioButton w = (JRadioButton)e.getSource(); if (q.equals(mybutton))

    2熱度

    1回答

    我有這樣的HTML結構: <p id="lorem"> <span class="part" id="n01">L</span><span class="part" id="n02">o</span><span class="part" id="n03">r</span><span class="part" id="n04">e</span><span class="part" id=

    2熱度

    4回答

    我想要使用箭頭鍵可以導航一組JRadioButton s。我打算用KeyListeners手動實現這一點,但顯然這種行爲至少應該在過去的8年中(http://bugs.sun.com/view_bug.do?bug_id=4104452)。但是,它不適合我:按箭頭鍵不會執行任何操作。 Windows上的Java版本是7u45。 一個獨立的測試案例,看看我說的是: import java.awt.*

    0熱度

    1回答

    問題我在與單選按鈕的問題,並將它們添加到我的GUI佈局。我正嘗試將一組按鈕加載到我的面板「orderPanel」中,並將該組放置在說明標題和文本區域空間旁邊。我試圖將它放在名爲「probLabel」的標題下。 public class AmhPhGui extends JFrame { /* set up for GUI */ public AmhPhGui() throws ParseE

    2熱度

    5回答

    我想讓用戶選擇其中一個選項。 但我的代碼不起作用。不知道是否我錯了 if (!jRadioMale.isSelected() || !jRadioFemale.isSelected()) { JOptionPane.showConfirmDialog(rootPane, "Please Select Male or Female", "", JOpti

    1熱度

    1回答

    我的程序是一個GUI。我有這種方法,當點擊一個按鈕。它使用JRadioButton動態地填充下一個屏幕。 private void setExamButtonActionPerformed(java.awt.event.ActionEvent evt) { if(evt.getActionCommand().equals("Set Exam")) {

    0熱度

    2回答

    我正在做一個簡單的GUI畫框程序。 但是,我有添加2個相似的分隔組以相同的方式相應的問題。 我的意思是,當我點擊上述構造函數線,然後下面還有一個JRadioButton 線已被選中。我該怎麼辦? 您是否需要查看我的代碼?請讓我知道 非常感謝。 P/S:它說我需要10的聲譽後圖像

    1熱度

    1回答

    該方法應該創建儘可能多的按鈕,如給定字符串 ,然後返回選定的字符串。 Eclipse說,我的返回語句不返回一個字符串。 我該如何編寫return語句才能做到這一點? private static String getActionDialog(String... actions) { JRadioButton[] buttons = new JRadioButton[actions.le

    -7熱度

    1回答

    我想設置我的JButton只有當我檢查我的單選按鈕組中的一個單選按鈕時啓用。我怎樣才能做到這一點?

    0熱度

    2回答

    <asp:RadioButtonList ID="lstTrip" runat="server" AutoPostBack="True" RepeatDirection="Horizontal" Font-Names="Arial" Font-Size="Small" onselectedindexchanged="lstTrip_SelectedIndexChanged"> <asp:List