Om tekst op meerdere lijnen te scheiden in Java moet een “+” teken gebruikt worden zie voorbeeld
String s = “blah blah” +
“blah blah” +
“blah blah” +
“blah blah” +
“…” +
“…” +
“”;
Archive for the ‘Java’ Category
Multiline string Java
Problemen met eerste component in GWT designer
Het eerste component die in Entrypoint zich bevind heeft een probleem namelijk het wordt automatisch verschuift helemaal naar rechts. Als het eerste component is een panel dan worden alle onderliggende widgets ontoegankelijk. Dus het is beter eerste component als dummy gebruiken.
Zie video.
Adding a JAR file to the build path eclipse
http://help.eclipse.org/help31/index.jsp?topic=/org.eclipse.jdt.doc.user/tasks/tasks-113.htm
Adding a JAR file to the build path
You can add a JAR file stored either in the workbench or anywhere in your file system to the build class path.
To add a JAR to your build class path follow these steps:
1. Select the project, and from its pop-up menu, select Properties. In […]
Java syntax
Basic Program
//////////////////////////////////////////////////////////////////////////////
// name: HelloWorldApp?
// purpose: stand-alone executable class (has main) that prints “hello world”
// notes: everything in java must be inside a class (no “floating” functions)
// traditionally each source file represents one class (with its name)
//////////////////////////////////////////////////////////////////////////////
public class HelloWorldApp?
{
//////////////////////////////////////////////////////////////////////////////
// name: main
// purpose: […]
GWT installatie debian
( om in een keer alles te installeren
# aptitude -r install java )
Handmatig installatie
Java moet eerst geïnstalleerd worden
# apt-get install sun-java5-jdk
dan link aanpassen
# rm /usr/bin/java
om te zien waar pkg is geinstalleerd
# dpkg -L sun-java5-jdk
om link te maken
# ln -s /usr/lib/jvm/java-1.5.0-sun/bin/java /usr/bin/java
en
sudo update-java-alternatives -s java-1.5.0-sun
met […]
Array Java
http://www.idevelopment.info/data/Programming/java/collections/ArrayListExample.java
//
// ArrayListExample?.java
//
/*
* =============================================================================
* Copyright (c) 1998-2007 Jeffrey M. Hunter. All rights reserved.
*
* All source code and material located at the Internet address of
* http://www.idevelopment.info is the copyright of Jeffrey M. Hunter and
* is protected under copyright laws of the United States. This source code may
* […]
Eclipse installeren Debian
Met deze opdracht worden alle benodigde pckg geïnstalleerd. Configuratie is veel gemakkelijker dan
# sudo aptitude -r install eclipse
JDBC basics
http://java.sun.com/docs/books/tutorial/jdbc/basics/index.html
JDBC basics
Java Servlets
http://www.yolinux.com/TUTORIALS/LinuxTutorialTomcat.html
YoLinux? Tutorial: Java Servlets, JSP, Jakarta-Tomcat, a Database (PostgreSQL? or MySQL?), Apache and Linux
This covers dynamic content using JAVA servlets, JAVA Server Pages (JSP and JASPER page compiler), Jakarta-Tomcat, Apache and a Database (PostgreSQL? or MySQL?) on Red Hat Linux 7.2. A configuration presented here will allow one to make a web request to […]
Java eclipse jdbc connector
- Maak een nieuwe project aan. / File / New project / Java Project /
- Geef een naam voor de project en klick “Next”
- In volgende venster tab Libraries klick op de knop “Add externeal JARS”
- Blader naar de map waar mysql-connector-java-X.X.X -bin.jar zich bevind en selecteer hem. “OK” […]
Java Swing
http://java.sun.com/docs/books/tutorial/uiswing/
http://java.sun.com/docs/books/tutorial/uiswing/TOC.html
Swing is de API voor het maken van Grafische User Interfaces in de programmeertaal Java. Swing bouwt voort op de AWT-library’s. Het is beschikbaar vanaf Java versie 1.2 en is ontwikkeld door Sun Microsystems.
De API bevat een groot aantal classes die onderdelen van grafische schermen representeren, zoals knoppen, panels, scrollbars etc.
In tegenstelling tot AWT, waar […]
java awt
Contains all of the classes for creating user interfaces and for painting graphics and images.
http://java.sun.com/j2se/1.4.2/docs/api/java/awt/package-summary.html
Programmeren in Java/GUI
AWT
De Abstract Window Toolkit (AWT) is de platformonafhankelijke verzameling van klassen die een beroep doen op de grafische mogelijkheden van het onderliggende besturingssysteem, waardoor toch een platformafhankelijk uitzicht ontstaat.
Swing
Swing werd later ontwikkeld. De soms bedroevende grafische componenten van AWT (knoppen, vensters, navigatiebalken, …) werden geherdefinieerd in Swing. In tegenstelling tot AWT, waar elk grafische element […]
re Java
java.util.regex
Class Pattern
java.lang.Object
extended byjava.util.regex.Pattern
All Implemented Interfaces:
Serializable
public final class Pattern
extends Object
implements Serializable
A compiled representation of a regular expression.
A regular expression, specified as a string, must first be compiled into an instance of this class. The resulting pattern can then be used to create a Matcher object that can match arbitrary character […]
ArrayList gwt Java
Hier is JRE Emulation Library
http://code.google.com/webtoolkit/documentation/jre.html
Veel gebruikte class ArrayList
http://java.sun.com/j2se/1.4.2/docs/api/java/util/ArrayList.html
import java.util.ArrayList;
private ArrayList sinks = new ArrayList();
python jython interpreter eclipse
* Go to: window > preferences > pydev > Interpreter - (Jython/Python).
* 2. Choose the interpreter you have installed in your computer (such as python.exe or jython.jar)
* 3. Select the paths that will be in your SYSTEM PYTHONPATH. It’s important to select […]
Installing Pydev eclipse python
PyDev is a plugin that enables users to use Eclipse for Python and Jython development — making Eclipse a first class Python IDE — It comes with many goodies such as code completion, syntax highlighting, syntax analysis, refactor, debug and many others.
http://www.fabioz.com/pydev/manual_101_root.html
Android - An Open Handset Alliance Project
http://code.google.com/android/
http://code.google.com/android/documentation.html
The Open Handset Alliance, a group of more than 30 technology and mobile companies, is developing Android: the first complete, open, and free mobile platform. To help developers get started developing new applications, we’re offering an early look at the Android Software Development Kit.
Google Base Data API
http://code.google.com/apis/base/
What is the Google Base data API?
The Google Base data API enables developers to :
* query Google Base data to create applications and mashups.
* input and manage Google Base items programmatically.
*
Developer’s Guide
[…]
YouTube APIs and Tools
http://code.google.com/apis/youtube/overview.html
What are the YouTube APIs and Tools?
The YouTube APIs and Tools open up a full range of YouTube functionality for web pages, software and devices. Users of the API can upload new videos, edit video metadata such as comments and favorites and modify user settings. Your client application can request a list of videos that […]
