Facebook Java Jar 240x320 May 2026
private void showPostStatusScreen() statusBox = new TextBox("What's on your mind?", "", 200, TextField.ANY); sendCommand = new Command("Send", Command.OK, 1); backCommand = new Command("Back", Command.BACK, 2); statusBox.addCommand(sendCommand); statusBox.addCommand(backCommand); statusBox.setCommandListener(this); display.setCurrent(statusBox);
Here’s a nostalgic, full Java ME (J2ME) piece for a classic 240x320 feature phone — a Facebook-like status viewer and feed simulator, packaged conceptually as a runnable JAR. facebook java jar 240x320
private Vector statuses; private Vector authors; private Vector times; sendCommand = new Command("Send"
private Command exitCommand; private Command postCommand; private Command refreshCommand; private Command selectCommand; private Command backCommand; private Command sendCommand; backCommand = new Command("Back"
private void showMainForm() mainForm = new Form("Facebook 240x320"); mainForm.append("Welcome, User!\n"); mainForm.append("Latest updates:\n\n"); feedList = new List("News Feed", List.IMPLICIT); for (int i = 0; i < authors.size(); i++) String item = authors.elementAt(i) + ":\n" + truncate((String)statuses.elementAt(i), 30) + "\n" + times.elementAt(i); feedList.append(item, null); exitCommand = new Command("Exit", Command.EXIT, 1); postCommand = new Command("Post", Command.SCREEN, 2); refreshCommand = new Command("Refresh", Command.SCREEN, 3); feedList.addCommand(exitCommand); feedList.addCommand(postCommand); feedList.addCommand(refreshCommand); feedList.setCommandListener(this); display.setCurrent(feedList);
private String truncate(String s, int maxLen) if (s.length() <= maxLen) return s; return s.substring(0, maxLen - 3) + "...";