Doubt in Java Swing

Rhythmrocks

Disciple
I have a doubt in java Swings. Assume in a GUI SCreen, we have a Table where there are 5 columns. On clicking, the TAB key on the Keyboard, the cursor goes thru each column. Assume for a particular column named "Ccity", there is a ellipsis(...) button at the corner of the "Ccity" column. When the ellipsis button is clicked, it gets displays another table where we can select a particular value for that Column "Ccity".

Here my query is while pressing the TAB key,and when the cursor is positioned on the column "Ccity", and when the TAB key is pressed, it should point to the Ellipsis(..) button rather than the Cursor going on to the Next Column.

I hope u understand what am trying to say.... Please help me in this..

Thanks in Advance
 
Another swing doubt ?? invoking one jpanel form from another jpanel form

Sugg me, I ve imported the package where the forms are residing ....
 
getgo said:
Another swing doubt ?? invoking one jpanel form from another jpanel form
Sugg me, I ve imported the package where the forms are residing ....

try creating the object of JPanel in the other JPanel from.
 
This is the code what you have said I ve already done in netbeans but nothig seems to be working:

package CMS;

import CMS.Login;
import java.awt.Toolkit;
import java.awt.event.ActionListener;
import java.awt.event.WindowListener;
import javax.swing.JFrame;
public class ContactManagementSystem extends JFrame {

/** Creates new form ContactManagementSystem */
public static void main(String[] args) {
new ContactManagementSystem().setVisible(true);
}
public ContactManagementSystem() {
initComponents();
setTitle("ContactManagementSystem");
}

/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">
private void initComponents() {
jButton1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
formMouseClicked(evt);
}
});

jButton1.setText("Enter Into Contact Management System");
jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
jButton1MouseClicked(evt);
}
});
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(43, Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(37, 37, 37))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(203, 203, 203)
.addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 62, Short.MAX_VALUE)
.addGap(35, 35, 35))
);
pack();
}// </editor-fold>

private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {
// TODO add your handling code here:
new Login(this).setVisible(true);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
new Login(this).setVisible(true);
}


private void exitForm(java.awt.event.WindowEvent evt) {
System.exit(0);
}
private void formMouseClicked(java.awt.event.MouseEvent evt) {

}

/**
* @param args the command line arguments
*/


// Variables declaration - do not modify
private javax.swing.JButton jButton1;
// End of variables declaration

}

I have imported another form "Login" ( shown by bold line ) also in the ActionPerformed event called the Login form ( shown by bold line ) but nothing seems to be working

N.B. I ve done everything in netbeans :huh:
 
Type this to invoke UR_Panel2 from UR_Panel1: (type this in UR_Panel1 ' s appropriate method)

JFrame frm = new JFrame();
UR_Panel2 objPanel2 = new UR_Panel2();
frm.setContentPane(objPanel2);
frm.pack();
frm.setVisible(true);
this.setDefaultClose(this.ExitOnClose);
// there may be few spelling mistakes in syntax, please use some referance in that case... all the best
 
Back
Top