// Only hide it on close and make it appear in middle of screen
this.addContact.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
- this.addContact.setLocationRelativeTo(null);
+ this.addContact.setLocationRelativeTo(this.frame);
// Set always on top and auto-focus
this.addContact.setAlwaysOnTop(true);
* Then read the file into RAM (yes, not perfect for >1000 entries ...)
* and get a List back.
*/
- List<Storeable> list = this.readList();
+ List<? extends Storeable> list = this.readList();
// List must be set
assert (list instanceof List) : "list has not been set."; //NOI18N
}
@Override
- public Iterator<?> iterator () throws BadTokenException {
+ public Iterator<? extends Storeable> iterator () throws BadTokenException {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
boolean isFound = false;
// Start iteration
- Iterator<Contact> iterator = this.getBackend().iterator();
+ Iterator<? extends Storeable> iterator = this.getBackend().iterator();
// Check all entries
while (iterator.hasNext()) {
// Get next element
- Contact c = iterator.next();
+ Contact c = (Contact) iterator.next();
// Debug message
this.getLogger().debug(MessageFormat.format("c={0},contact={1}", c, contact)); //NOI18N