Let's go.........RANDOM!
-
- level5
- Posts: 1186
- Joined: Fri Aug 31, 2007 4:37 pm
- Contact:
- bert_the_turtle
- level5
- Posts: 4795
- Joined: Fri Oct 13, 2006 6:11 pm
- Location: Cologne
- Contact:
- tabasco boy
- level5
- Posts: 1180
- Joined: Sun Mar 10, 2002 4:25 pm
- Location: Lovely Planet Earth
- Contact:
elexis wrote:Does anyone know how in Java I can check whether the shift key is pressed from within an ActionEventListener inner class for a button? Google doesn’t seem to be helping
isn't it something like:
public void keyPressed(KeyEvent e) {
// Handle the keys
switch (e.getKeyCode()) {
case VK_SHIFT:
System.out.printIn(" The Shift key was pressed." );
break;
}
}
don't hold me on it as i'm kinda rusty now.
What I want to do is make the button do something different when the shift key is pressed when you click it. Currently I am using a MouseEventListener which allows me to to pretty much what tabasco boy said on MouseClick but ive noticed that you sometimes need to Click/Shift-Click the button several times before anything happens. I am assuming this is because im not using the preferable ActionEventListener to check if the button is being used. The problem is i cant find any way to check if the key (shift is a modifier key) is down or not without using the MouseEvent of KeyEvent listeners. I *could* put a Key listener in EVERY focusable object in the gui which checks this but thats horrible inefficient.
- Ace Rimmer
- level5
- Posts: 10803
- Joined: Thu Dec 07, 2006 9:46 pm
- Location: The Multiverse
Feud wrote:Come on England, you guys still haven't tossed that Wikileaks guy off the Tower Bridge? What's the hold up?
They're probably afraid of creating a bloody mess.
On a side-note I think the world is hugely overestimating the impact of this whole deal and I predict we will all have forgotten about this in a month, when Assange is probably back in Sweden with his may-or-may-not-have-been rape victims to laugh off this whole matter.
Jelco
PS: Pun intended.
"The ships hung in the sky much the same way that bricks don't."
- Douglas Adams
- Douglas Adams
-
- Site Admin
- Posts: 1783
- Joined: Sat Mar 14, 2009 1:48 am
- Location: North of the Wall
- Contact:
Yesterday someone actually had the nerve to come into SNT's IRC channel asking if we were alright with him DDoSsing Mastercard.com. (Just to be clear, SNT is the association that basically handles the entire customer-side of our campus network including abuse, the hardware maintenance is mostly Uni-operated.) It's seriously getting ridiculous.
Personally I find the whole "woop let's DDoS lotsa big companies because we can pretend to have a valid reason for it" thing quite pathetic. The rest of the world wakes up and starts questioning the stability of the internet resulting in wildly inaccurate explanations popping up in every single TV show and news broadcast we know and stupid urban legends thrown into the world. Meanwhile from a political point of view this could just as easily have happened by sending all that material to the press and it would've spread equally fast. Other than that I of course think the US (and to a lesser extent, other governments) are way too eager to label Assange as a scapegoat because they obviously have holes in their system that need to be plugged, but at the same time I understand the reaction and do believe that releasing this on the internet is a bad move, rightfully labelled a criminal act by law. Comparatively the focus would much more be on the leaks themselves than the releasing parties had this been sent purely to the press. While still illegal because it still concerns the release of classified documents to the public, it's a lot better for containment and damage control.
Interestingly most of the Mastercard DDoS appears to have come from the Netherlands, particularly the datacentre I have a server located (or, including the one I share with Max, 2 at the moment). Same one that hosts Wikimedia Europe and recently saw the dismantling of the Bredolab core CC servers. So yay, more police paying my servers a visit.
Jelco
Personally I find the whole "woop let's DDoS lotsa big companies because we can pretend to have a valid reason for it" thing quite pathetic. The rest of the world wakes up and starts questioning the stability of the internet resulting in wildly inaccurate explanations popping up in every single TV show and news broadcast we know and stupid urban legends thrown into the world. Meanwhile from a political point of view this could just as easily have happened by sending all that material to the press and it would've spread equally fast. Other than that I of course think the US (and to a lesser extent, other governments) are way too eager to label Assange as a scapegoat because they obviously have holes in their system that need to be plugged, but at the same time I understand the reaction and do believe that releasing this on the internet is a bad move, rightfully labelled a criminal act by law. Comparatively the focus would much more be on the leaks themselves than the releasing parties had this been sent purely to the press. While still illegal because it still concerns the release of classified documents to the public, it's a lot better for containment and damage control.
Interestingly most of the Mastercard DDoS appears to have come from the Netherlands, particularly the datacentre I have a server located (or, including the one I share with Max, 2 at the moment). Same one that hosts Wikimedia Europe and recently saw the dismantling of the Bredolab core CC servers. So yay, more police paying my servers a visit.

Jelco
"The ships hung in the sky much the same way that bricks don't."
- Douglas Adams
- Douglas Adams
Who is online
Users browsing this forum: No registered users and 3 guests