5 Reusable Code Snippet Topics

Remove Filter
Member Avatar for peter_budo

Simple code to see if array of primitives has duplicates. The aim is to only check if there are any duplicates, but not to check what element is repeated, or its position etc. PS: Do you know some handy snippet? Don't way, post it!

Member Avatar for odoepner
4
972
Member Avatar for peter_budo

Sometimes one line of tool tip is not enough. You may want to try and play around with JToolTip, but if you in hurry this "little hack" can be handy. With little of HTML plus CSS code you can work out various formats (font, colour, alignment, size etc.).

Member Avatar for peter_budo
2
508
Member Avatar for peter_budo

In my current project we need to provide drag&drop functionality of items from left to right and vice-versa and on click of the button send array of item IDs to server. Main problem was that we couldn't get array across to server and online examples that we found did not …

2
908
Member Avatar for peter_budo

Here is simple example of static image to be displayed as logo on the start-up/splash screen. This can be improved by creating animation out of series of images or use of flash file through [URL="http://developer.sonyericsson.com/site/global/newsandevents/latestnews/newsapr08/p_project_capuchin_announcement.jsp"]Project Capuchin[/URL] library. As for location of image file this was placed in new folder called …

6
701
Member Avatar for peter_budo

This is simple example how to get data reading from mobile phone's in-built sensor with JSR-256 and Java Microedition SensorMidlet.java [code=java]/** * * @author Peter Miklosko * @homepage http://www.peterscorner.co.uk */ import javax.microedition.midlet.MIDlet; import javax.microedition.lcdui.Canvas; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.CommandListener; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; public class SensorMidlet extends MIDlet implements CommandListener { …

0
223

The End.