久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='TKbcd'></small><noframes id='TKbcd'>

    <bdo id='TKbcd'></bdo><ul id='TKbcd'></ul>
<i id='TKbcd'><tr id='TKbcd'><dt id='TKbcd'><q id='TKbcd'><span id='TKbcd'><b id='TKbcd'><form id='TKbcd'><ins id='TKbcd'></ins><ul id='TKbcd'></ul><sub id='TKbcd'></sub></form><legend id='TKbcd'></legend><bdo id='TKbcd'><pre id='TKbcd'><center id='TKbcd'></center></pre></bdo></b><th id='TKbcd'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TKbcd'><tfoot id='TKbcd'></tfoot><dl id='TKbcd'><fieldset id='TKbcd'></fieldset></dl></div>

<tfoot id='TKbcd'></tfoot>

      1. <legend id='TKbcd'><style id='TKbcd'><dir id='TKbcd'><q id='TKbcd'></q></dir></style></legend>
      2. JSpinner 值變化事件

        JSpinner Value change Events(JSpinner 值變化事件)
          • <bdo id='UVxjO'></bdo><ul id='UVxjO'></ul>

          • <legend id='UVxjO'><style id='UVxjO'><dir id='UVxjO'><q id='UVxjO'></q></dir></style></legend>

              <small id='UVxjO'></small><noframes id='UVxjO'>

              <i id='UVxjO'><tr id='UVxjO'><dt id='UVxjO'><q id='UVxjO'><span id='UVxjO'><b id='UVxjO'><form id='UVxjO'><ins id='UVxjO'></ins><ul id='UVxjO'></ul><sub id='UVxjO'></sub></form><legend id='UVxjO'></legend><bdo id='UVxjO'><pre id='UVxjO'><center id='UVxjO'></center></pre></bdo></b><th id='UVxjO'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='UVxjO'><tfoot id='UVxjO'></tfoot><dl id='UVxjO'><fieldset id='UVxjO'></fieldset></dl></div>

              1. <tfoot id='UVxjO'></tfoot>
                    <tbody id='UVxjO'></tbody>
                  本文介紹了JSpinner 值變化事件的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  當(dāng) jSpinner 值改變時(shí)如何立即更新.

                  How to make the update immediately when the jSpinner value was changed.

                  ChangeListener listener = new ChangeListener() {
                    public void stateChanged(ChangeEvent e) {
                      jLabel.setText(e.getSource());
                    }
                  };
                  
                  spinner1.addChangeListener(listener);
                  

                  上面的代碼不會(huì)自動(dòng)改變標(biāo)簽文本,它需要你在任何地方再次點(diǎn)擊才能更新.

                  The code above doesnt change the label text automatically, it required you to click again anyplace to update.

                  推薦答案

                  答案是配置JFormattedTextField中使用的格式化程序,它是微調(diào)器的編輯器的子項(xiàng):

                  The answer is to configure the formatter used in the JFormattedTextField which is a child of the spinner's editor:

                      formatter.setCommitsOnValidEdit(true);
                  

                  不幸的是,得到一個(gè)人的手就像介紹句一樣又長(zhǎng)又臟:

                  Unfortunately, getting one's hand on it is as long and dirty as the introductory sentence:

                      final JSpinner spinner = new JSpinner();
                      JComponent comp = spinner.getEditor();
                      JFormattedTextField field = (JFormattedTextField) comp.getComponent(0);
                      DefaultFormatter formatter = (DefaultFormatter) field.getFormatter();
                      formatter.setCommitsOnValidEdit(true);
                      spinner.addChangeListener(new ChangeListener() {
                  
                          @Override
                          public void stateChanged(ChangeEvent e) {
                              LOG.info("value changed: " + spinner.getValue());
                          }
                      });
                  

                  一種稍微(但不是很多)更簡(jiǎn)潔的方法可能是繼承 NumberEditor 并公開一個(gè)允許配置的方法

                  A slightly (but not by much) cleaner way might be to subclass NumberEditor and expose a method which allows the config

                  這篇關(guān)于JSpinner 值變化事件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How can I detect integer overflow on 32 bits int?(如何檢測(cè) 32 位 int 上的整數(shù)溢出?)
                  Local variables before return statements, does it matter?(return 語句之前的局部變量,這有關(guān)系嗎?)
                  How to convert Integer to int?(如何將整數(shù)轉(zhuǎn)換為整數(shù)?)
                  How do I create an int array with randomly shuffled numbers in a given range(如何在給定范圍內(nèi)創(chuàng)建一個(gè)隨機(jī)打亂數(shù)字的 int 數(shù)組)
                  Inconsistent behavior on java#39;s ==(java的行為不一致==)
                  Why is Java able to store 0xff000000 as an int?(為什么 Java 能夠?qū)?0xff000000 存儲(chǔ)為 int?)
                      <tbody id='vLLjz'></tbody>
                      <tfoot id='vLLjz'></tfoot>

                          <legend id='vLLjz'><style id='vLLjz'><dir id='vLLjz'><q id='vLLjz'></q></dir></style></legend>
                          <i id='vLLjz'><tr id='vLLjz'><dt id='vLLjz'><q id='vLLjz'><span id='vLLjz'><b id='vLLjz'><form id='vLLjz'><ins id='vLLjz'></ins><ul id='vLLjz'></ul><sub id='vLLjz'></sub></form><legend id='vLLjz'></legend><bdo id='vLLjz'><pre id='vLLjz'><center id='vLLjz'></center></pre></bdo></b><th id='vLLjz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vLLjz'><tfoot id='vLLjz'></tfoot><dl id='vLLjz'><fieldset id='vLLjz'></fieldset></dl></div>

                          <small id='vLLjz'></small><noframes id='vLLjz'>

                            <bdo id='vLLjz'></bdo><ul id='vLLjz'></ul>

                          • 主站蜘蛛池模板: 91在线免费视频 | 九九久久这里只有精品 | 精品欧美一区二区三区久久久 | 一区二区视频在线观看 | 毛片免费观看 | 久久性色| 久久精品99国产精品 | av毛片| 国产一区二区三区四区五区3d | 日本福利在线观看 | 久草热播 | a在线免费观看 | 亚洲高清视频在线观看 | 亚洲在线免费观看 | 欧美精品1区2区3区 精品国产欧美一区二区 | 久久国产精品一区二区三区 | 99这里只有精品 | 91高清在线观看 | 欧美操操操 | 在线观看国产精品一区二区 | 色接久久 | 在线只有精品 | 九九亚洲精品 | 看真人视频一级毛片 | 乱码av午夜噜噜噜噜动漫 | 99精品国产成人一区二区 | 日韩精品一区二区三区中文在线 | 中国一级大黄大片 | 黄色a三级 | 色视频网站在线观看 | 国产免费一区二区三区最新6 | 一区二区三区在线免费观看 | www.国产精品 | 日日躁狠狠躁aaaaxxxx | 国产精品日韩高清伦字幕搜索 | 中文欧美日韩 | 欧美乱大交xxxxx另类电影 | 成年人视频在线免费观看 | 一区二视频 | 亚洲一区自拍 | 亚洲成人精品 |