Spy Mouse For Android

This game is a cutesy and is easy to play, but not that very easy to clear as you progress to the next world.

Enemies get harder to get through and achievements required to be completed usually looks impossible to me if it is needed that you clear it in just a few seconds. I hate that kind of requirement.

This game features Agent Squeak, a spy mouse, super secret operative serving the needs of mice everywhere. All you need to do is get all the cheese in order to enable the levels’ exit. While each level features different kinds of achievements, getting all of them may require you to play the level again and again.

You simple use your finger to guide Spy Mouse to get all the cheese. Powerups like chili to boost your speed help you evade enemies or run away from them without being caught.

You can even use back doors to go from one place to the other. It is all a matter of using the right strategy to accomplish the achievements and clear the level.

The graphics are cute, crisp and the cats’ character drawings have a physical similarity to Inspector Gadget’s enemy’s cat.

EA did a good job with this game. Although the Android version’s licensing scheme is pretty annoying since I have to enable my WIFI in order for the licensing check to proceed. Otherwise, I could not play the game.

Sneak or be snacked. Catchy phrase, right?

Convert Mouse Position To Caret Position In A JTextComponent

Converting a mouse position to the caret position of a JTextComponent can be done by using the JTextComponent method viewToModel(). This can be pretty useful if you need to set the caret position of the component when you do a right click of the mouse.

The component can apply to JTextArea, JEditorPane and JTextPane respectively.

Point p = mouseEvent.getPoint();
textpane.setCaretPosition(textpane.viewToModel(p));

Get JDialog Location After Mouse Drag

I thought using a MouseListener and MouseMotionListener would do the trick in getting a JDialog‘s new location after a mouse drag. Turns out using those Listeners will only affect the JDialog if the mouse drag happens within its content pane. The correct listener to use is ComponentListener and getting the value in the componentMoved() method.

addComponentListener(new ComponentAdapter() {
    @Override
    public void componentMoved(ComponentEvent e) {
        System.out.println(getLocationOnScreen());
    }
});
Related Posts Plugin for WordPress, Blogger...