Jump to content

Chicken Wing

Members
  • Posts

    610
  • Joined

  • Last visited

  • Feedback

    100%

Posts posted by Chicken Wing

  1. I got a Filco Majestouch 2 which costs around the same as the Das i think, Its very nice and has really good build quality, it could probably last my entire life tbh.

     

    I would easily recommend this das keyboard, it looks very good, you might want to look into Filco or even Ducky (Ducky legend is nice).

     

    If your worried about it being too loud, dont get the blue switchs, get brown if you want tactile feedback, otherwise get reds or blacks I guess. Or just look up the different Cherry switches and choose for yourself.

     

  2. Action listeners on text fields only trigger when you hit ENTER.

    Some approaches you can use are either to make the textfield a class member, and use its value directly in the closest filter; or use an event on the button instead.

    Though in reality you should probably redesign the whole thing, and separate the user interface code from the main script class.

     

    Or you could just add a document listener instead of an action listener?

     

    https://docs.oracle.com/javase/tutorial/uiswing/events/documentlistener.html

     

    edit: think this works

    selectYourMonster.getDocument().addDocumentListener(new DocumentListener() {
        @Override
        public void insertUpdate(DocumentEvent e) {
            onUpdate();
        }
    
        @Override
        public void removeUpdate(DocumentEvent e) {
            onUpdate();
        }
    
        @Override
        public void changedUpdate(DocumentEvent e) {
            onUpdate();
        }
    
        private void onUpdate(){
            monsterSelect = selectYourMonster.getText();
        }
    });
    
    • Like 1
×
×
  • Create New...