Meta
Tag Cloud
Category Archives: Java
Presenting TimeOTPClient
Because most people have their java enabled mobile phone with them, and I did not want to buy an expensive token generator I decided to write a MIDlet that can generate passwords as specified in the TOTP algorithm. This project … Continue reading
A TableModel for Entity Beans
For my graduation project i needed a component that could display a list of Entity Beans. I found that JTable is such a component and with the help of custom TableCellRenderer and TableCellEditor components i was able to customize the … Continue reading
Posted in Hibernate
Leave a comment
BBCode for Graphics2D
For my graduation project we needed the ability to print a couple of bills etc. Printing lines was pretty simple with the LinesPrinter i blogged about a while ago. We had two choices: either implement a specific print method for … Continue reading
Posted in Java
Leave a comment
Couple of screenshots of my graduation project
Here are a couple of screenshots of my graduation project i’ve been working on last couple of weeks. The GUI is built with Swing, the bussiness rules make extensive use of the Apache BeanUtils and Hibernate Validators packages and with … Continue reading
Printing an array of strings
Yesterday i’ve been experimenting with Printing on the Java Platform. I needed to generate a printout of ordered menuitems on the default printer. It took a while before i found out there is translation needed between the coordinates of the … Continue reading
Posted in Java
Leave a comment
ManyToMany relationships with Java Persistence (JSR-220)
The scenario is as following: each table can have many reservations, and each reservation can span many tables. Here is our first trial: // Table.java @ManyToMany( targetEntity=Reservation.class ) public List getReservations() {..} // Reservation.java @ManyToMany( targetEntity=Table.class ) public List getTables() … Continue reading
Posted in Hibernate
Comments Off
OneToMany relationships with Java Persistence (JSR 220)
Let’s experiment a bit with Hibernate. We want to model the tables employee and shift. Each employee has multiple shifts (and each shift belongs to an employee). We want an employee table and a shift table (which has the employee_id … Continue reading
Telnet server
A telnet server that writes the content of a file to it’s clients: banner.txt.
Posted in Java
Leave a comment
Formatted input
I was in need for formatted input and the decomposition of the input into a stream of tokens so i came up with the following: And now i am ready for formatted input like this: public class Main { public … Continue reading
Posted in Java
Leave a comment