13 Topics

Member Avatar for
Member Avatar for scheppy

Hi Guys, I ussually dont post anything here often, just get everything off of everyone elses questions, but I'm having a strange problem that im scratching my head over, I have a JTable where I can Add and remove rows... This is just for testing purposes, I'm about to make …

Member Avatar for scheppy
0
745
Member Avatar for Nation

I have a JTable that has four columns. In the second column I have assigned a JComboBox to be the cell editor of my column.The problem that I encountered is that I cannot handle the combobox the way I want. **What I want is that after a user select an …

Member Avatar for mKorbel
0
2K
Member Avatar for asaidi

Hi i have 2 tables customer (cabinet_num which is integer) and cabinet (cabinet_num Autoincrement and cabinet_title) in my java i can display cabinet title to let the user choose a cabinet..but i want to collect the cainet_number in my customer table customet.cabinet package cabinet; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; …

Member Avatar for mKorbel
0
299
Member Avatar for CoilFyzx

Hello good day. Thank you for trying to help. My problem is as follows. A few columns in my table, use a JComboBox as the editor for their cells. Each cell, in a row (via JComboBox) presents the same choices to the user. The user is allowed to choose from …

Member Avatar for mKorbel
0
1K
Member Avatar for chdboy

Is there any way that I don't use lots of IF statements?,right now it is according to Index of combo box items. else if(e.getSource().equals(jcb1)) { int selectedindex = jcb1.getSelectedIndex(); String comb_string = (String)jcb1.getSelectedItem(); if(selectedindex==1) { try { //String sql_command ="select * , count(*) over (partition by 1) total_rows from Employer …

Member Avatar for JamesCherrill
0
286
Member Avatar for psy.blast

Hello Daniweb Members, I am a beginner programmer and I have a problem, I am doing a PAT (Practical Assessment Task) for my school and I have come accross a huge problem, I'm trying to get a value from a selected combobox in Netbeans, (I am using the GUI builder), …

Member Avatar for JamesCherrill
0
240
Member Avatar for 47pirates

I want to update the contents of Jtable as shown below when the Jcombobox's item state is chaged in the left panel. but i am not being successful in it .Please help. ![untitled29](/attachments/large/2/untitled29.JPG "untitled29") when the table no value is changed in the left panel , i want corresponding Jtable …

Member Avatar for 47pirates
0
510
Member Avatar for 47pirates

I need to update the items of JCombobox from the database during runtime. I had made the JCombobox editable and what i need to do is type something in the editable combobox and search the database and only display the items matching the text. For example there are if i …

Member Avatar for JamesCherrill
0
2K
Member Avatar for sahmeme

only the first item in the combobox will be returened even if i selected another item. HELP! [CODE] try{ //combobox of the products rs = stmt.executeQuery(query2); rs.last(); int i = rs.getRow(); String [] v = new String [i]; rs.beforeFirst(); i = 0; while(rs.next()) { v[i] = rs.getString(2); i++; //break; } …

Member Avatar for mKorbel
0
153
Member Avatar for sharvil_maniyar

run: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.sun.java.swing.plaf.nimbus.NimbusStyle.init(NimbusStyle.java:418) at com.sun.java.swing.plaf.nimbus.NimbusStyle.validate(NimbusStyle.java:359) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getValues(NimbusStyle.java:927) at com.sun.java.swing.plaf.nimbus.NimbusStyle.getInsets(NimbusStyle.java:605) at javax.swing.plaf.synth.SynthStyle.installDefaults(SynthStyle.java:896) at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:275) at javax.swing.plaf.synth.SynthLabelUI.updateStyle(SynthLabelUI.java:53) at javax.swing.plaf.synth.SynthLabelUI.propertyChange(SynthLabelUI.java:232) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276) at java.awt.Component.firePropertyChange(Component.java:8128) at java.awt.Component.setName(Component.java:935) at javax.swing.plaf.synth.SynthComboBoxUI$SynthComboBoxRenderer.getListCellRendererComponent(SynthComboBoxUI.java:409) at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI.java:1334) at javax.swing.plaf.basic.BasicComboBoxUI.getMinimumSize(BasicComboBoxUI.java:903) at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(BasicComboBoxUI.java:892) at javax.swing.JComponent.getPreferredSize(JComponent.java:1634) at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedPreferredSize(GroupLayout.java:2944) at javax.swing.GroupLayout$ComponentSpring.calculateNonlinkedMinimumSize(GroupLayout.java:2930) at javax.swing.GroupLayout$ComponentSpring.calculateMinimumSize(GroupLayout.java:2897) at javax.swing.GroupLayout$Spring.getMinimumSize(GroupLayout.java:1315) at javax.swing.GroupLayout$ComponentSpring.calculatePreferredSize(GroupLayout.java:2904) …

Member Avatar for JamesCherrill
0
787
Member Avatar for TIM_M_91

Hi guys well I have created a JComboBox that lists all my values from a String. However I want instead of the values for the JComboBox to be in a String the values to be displayed in the JComboBox from my database so if more values are added to the …

Member Avatar for rushikesh jadha
0
142
Member Avatar for vishalonne

Hi I am writing one simple program for upgrading my knowlegde from C# to Java but I am failed to attach ActionListener to JComboBox which is added to a cell of JTable at run time. Actually I want to perform update operation and delete operation on selecting Update or Delete …

Member Avatar for mKorbel
0
214
Member Avatar for rowley4

I do not want to have my box this wide. I would like the text to wrap but I do not know how. Can I do this? I'd like my box to be 400,400 rather than 1250,200, but it is the only way I can get my text to fit. …

Member Avatar for quuba
0
608

The End.