Timeline for Type the Alphabet - as fast as you can!
Current License: CC BY-SA 3.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 17, 2020 at 9:04 | history | edited | Community Bot |
Commonmark migration
|
|
| Nov 2, 2017 at 12:26 | comment | added | Olivier Grégoire | @KevinCruijssen Cheers! ;-) | |
| Nov 2, 2017 at 10:19 | comment | added | Kevin Cruijssen |
@OlivierGrégoire Been able to golf it by two more bytes. keyChar 'a' through 'z' is 97-122, but keyCode is from 65-90, so using keyCode I can change both 121 (three bytes) to 89 (two bytes). :)
|
|
| Nov 2, 2017 at 10:08 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
added 12 characters in body
|
| Oct 31, 2017 at 8:00 | comment | added | Kevin Cruijssen |
@OlivierGrégoire Yeah, keeping c when I only use it one was just dumb.. And smart way of using initialization-blocks for both the Frame and TextArea.
|
|
| Oct 31, 2017 at 7:59 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
added 153 characters in body
|
| Oct 30, 2017 at 19:56 | comment | added | Olivier Grégoire | You're welcome! But I got it down further to 320 bytes. ;-) | |
| Oct 30, 2017 at 14:52 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
deleted 92 characters in body
|
| Oct 30, 2017 at 14:45 | comment | added | Kevin Cruijssen |
@OlivierGrégoire Thanks! Didn't even knew KeyEvent had a getWhen method. In total 50 bytes saved thanks to you.
|
|
| Oct 30, 2017 at 14:44 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
added 169 characters in body
|
| Oct 30, 2017 at 13:33 | comment | added | Olivier Grégoire |
@KevinCruijssen Thanks, and no problem ;-) Though some more general comments: you don't need to output the letters twice. Echoing is already provided by TextField. Also, you could use TextArea instead of TextField to gain two bytes. Finally, KeyEvent has a getWhen method that gives the time between epoch and the event in milliseconds. Just need to use those instead of System.nanoTime() to gain even more bytes.
|
|
| Oct 30, 2017 at 13:18 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
edited body
|
| Oct 30, 2017 at 12:23 | comment | added | Kevin Cruijssen |
@OlivierGrégoire Thanks. Forgot about show and dispose, which is even shorter than setVisible. I almost never use Java's GUI.. And smart to use class-initialization instead of putting it in the main-method. I should remember that.
|
|
| Oct 30, 2017 at 12:22 | history | edited | Kevin Cruijssen | CC BY-SA 3.0 |
added 214 characters in body
|
| Oct 30, 2017 at 12:04 | comment | added | Olivier Grégoire |
388 bytes. I took the liberty to fix your code in addition to golfing because you used setVisible(false) instead of exiting.
|
|
| Oct 30, 2017 at 10:46 | comment | added | AncientSwordRage | impressive answer considering it has a gui! | |
| Oct 30, 2017 at 8:36 | history | answered | Kevin Cruijssen | CC BY-SA 3.0 |