| Message |
Post subject: Java Collection Framework (Lists) Posted: Fri Jul 24, 2009 7:51 am |
|
|
Introduction
Collection is defined as several things grouped together.
Java collection framework is made up of various interfaces to work with different groups. Implementation of the interfaces allow us to do our job but this means that data structure can be changed without changing the code.
Java.util package contains an interface called Collection. Collection is an interface which means it defines abstract methods (methods without body). The classes implementing this interface will define the implementation ...
Read more : Java Collection Framework (Lists) | Views : 271 | Replies : 0
|
|
| Top |
 |
Post subject: MIDlet programming Posted: Fri Jul 24, 2009 7:47 am |
|
|
MIDlets are an important part of J2ME technology. A MIDlet is simply a Java class with special features. To execute a MIDlet on a device, the target device should implement Java ME, CLDC and MIDP to run. MIDlets posses "compile once, run anywhere" feature which makes them very portable. MIDlet are distributes using jar and jad files file.
A MIDlet class whould have the following:
- The main class should extend javax.microedition.midlet.MIDlet. - The MIDlet ...
Read more : MIDlet programming | Views : 333 | Replies : 0
|
|
| Top |
 |
Post subject: Eclipse - shortcut to System.out.println Posted: Fri Jul 24, 2009 7:41 am |
|
Code: System.out.println();
This is a frequently used statement in Java. If you are working in Eclipse, you can save time using following shortcut:
type: syso now presss CTRL + SPACE BAR
Read more : Eclipse - shortcut to System.out.println | Views : 354 | Replies : 0
|
|
| Top |
 |
Post subject: Introduction to Hibernate Java Posted: Fri Jul 24, 2009 7:40 am |
|
|
Hibernate is a widely used open source software that provides object-relational mapping (ORM) solution for the Java language. It provides an easy to use framework for mapping an object-oriented domain model to a traditional relational database. It eases the work of application developer by generating the database code so developer does not have to handle relational data persistence-related programming tasks.
Java Persistence with Hibernate
Java provides JDBC to work with databases but the problem is ...
Read more : Introduction to Hibernate Java | Views : 218 | Replies : 0
|
|
| Top |
 |
Post subject: Animated GIFs By Java Posted: Fri Jul 24, 2009 7:35 am |
|
Code: import java.awt.*; import java.net.*; import javax.swing.*; public class Anima { public static void main(String[] args) throws MalformedURLException {
URL url = new URL("<URL to your Animated GIF>"); Icon icon = new ImageIcon(url); JLabel label = new JLabel(icon); JFrame f = new JFrame("Animation"); f.getContentPane().add(label); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.pack(); f.setLocationRelativeTo(null); f.setVisible(true); } }
Read more : Animated GIFs By Java | Views : 113 | Replies : 0
|
|
| Top |
 |
Post subject: How to Use Icons Trail: 2D Graphics Posted: Fri Jul 24, 2009 7:34 am |
|
|
import java.awt.*; import java.awt.image.BufferedImage; import java.io.*; import javax.imageio.ImageIO; import javax.swing.*;
public class LoadAndShow extends JPanel { BufferedImage image; Dimension size = new Dimension();
public LoadAndShow(BufferedImage image) { this.image = image; size.setSize(image.getWidth(), image.getHeight()); }
/** * Drawing an image can allow for more * flexibility in processing/editing. */ protected void paintComponent(Graphics g) { // Center image in this component. int x = (getWidth() - size.width)/2; int y = (getHeight() - size.height)/2; g.drawImage(image, x, y, this); } ...
Read more : How to Use Icons Trail: 2D Graphics | Views : 171 | Replies : 0
|
|
| Top |
 |
Post subject: Increase the heap size Posted: Fri Jul 24, 2009 7:32 am |
|
Code: -Xms256m -Xmx512m -XX:PermSize=64M -XX:MaxPermSize=1000M
These values should be provided to the VM.
Read more : Increase the heap size | Views : 115 | Replies : 0
|
|
| Top |
 |
Post subject: Use HTTPS in your Java client code Posted: Fri Jul 24, 2009 7:31 am |
|
|
If you've ever tried to implement secure communication between a Java client and an HTTPS (HyperText Transfer Protocol Secure) server, you've probably discovered that the standard java.net.URL class doesn't support the HTTPS protocol. The server-side implementation of that equation is fairly straightforward. Almost any Web server available today provides a mechanism for requesting data, using HTTPS. Once you have your Web server set up, any browser can request secure information from your server simply by ...
Read more : Use HTTPS in your Java client code | Views : 113 | Replies : 0
|
|
| Top |
 |
Post subject: Send File Using Java Socket Posted: Fri Jul 24, 2009 7:30 am |
|
|
in the site computersciencenotes.net section FAQ->Programming-> "send file with Java" explain how send a File using java socket.
- in section Download->Java->JavaProgramming there is a Project divided in 2 part: client and Server, that you can use for send a file.
Read more : Send File Using Java Socket | Views : 136 | Replies : 0
|
|
| Top |
 |
Post subject: Hibernate with multiple database Posted: Fri Jul 24, 2009 7:28 am |
|
Hibernate has a configuration file called hibernate.properties or hibernate.cfg.xml. There you can specify the properties of database like Code:
Code: hibernate.connection.driver_class jdbc driver class hibernate.connection.url jdbc URL hibernate.connection.username database user hibernate.connection.password database user password hibernate.connection.pool_size maximum number of pooled connections
By default if you download the hibernate source , it will working on hsqldb.
Read more : Hibernate with multiple database | Views : 167 | Replies : 0
|
|
| Top |
 |
|
Last 10 active topics
|