|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
|
[NetBeans/JavaBean] Creare comonenti custom per la Palette
Salve, Sto tentando di creare un componente personalizzato da aggiungere alla palette di netbeans... ma sto diventando cretino... quando provo ad aggiungerlo mi dice: "The component cannot be instantiated. Please make sure it is a JavaBeans component." Ma il componente è un JavaBean!!
Codice:
public class JSearchField extends JTextField {
private TableRowSorter<TableModel> sorter;
private JTable table;
private int colIndex;
private TableStringConverter tableStringConv;
public JSearchField() {
this(null);
}
public JSearchField(JTable table) {
super();
addKeyListener(new KeyAdapter() {
public void keyReleased(java.awt.event.KeyEvent evt) {
filedKeyReleased(evt);
}
});
}
private void filedKeyReleased(KeyEvent evt) {
}
/** Getter & Setter**/
public int getColIndex() {
}
public void setColIndex(int colIndex) {
}
public TableRowSorter<TableModel> getSorter() {
}
public void setSorter(TableRowSorter<TableModel> sorter) {
}
public JTable getTable() {
}
public void setTable(JTable table) {
}
public TableStringConverter getTableStringConv() {
}
public void setTableStringConv(TableStringConverter tableStringConv) {
}
}
Grazie a tutti!
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza" |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: May 2008
Città: Seattle (WA)
Messaggi: 306
|
Risolto! Dovevo togliere da un costruttore il super()! grazie lo stesso!
__________________
"Considerate la vostra semenza fatti non foste a viver come bruti ma per seguir virtute e canoscenza" |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 04:30.



















