Jagan Mohan Reddy

Greenhorn
+ Follow
since May 15, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Jagan Mohan Reddy

Hi,
Pls do let me know if web sphere 3.5 supports EJB 2.0.. Any help in this regard is appreciated.
Regards,
Jagan Mohan Reddy
Hi,
I am new of using weblogic 6.1 server. Can anybody help me how to create the connection pool in weblogic 6.1..Any help in this regard is appreciated..

Regards,
Jagan Mohan Reddy..
Hi,
Can anybody help me in telling me the difference between the memory allocation of these 2 scenarios
There are 2 classes A and B as foolows
class B {
int x = 5;
}
The class A can be in one form as
1. class A extends B {
int y= 7;
}
2. class A {
int y = 5;
public A() {
B b = new B();
}
}

Any suggestions in this regard are appreciated.
Regards,
Jagan Mohan Reddy..
22 years ago
Hi,
Make the label to be a final variable...

final JLabel label = new JLabel(new ImageIcon(URL,"Icon"));
In the inner class use
label.setIcon(new ImageIcon(URL,"Icon1"));

hope this mighr solve ur problem..
Regards,
Jagan Mohan Reddy
22 years ago
Hi,

If we use the bufferedImage class the flickering might be largely reduced..Though i have not tried on it,i think this class might be helpful for u..
Regards,
Jagan Mohan Reddy..
22 years ago
Hi,
Think the below sample code might solve ur problem..
table = new JTable(3,300);
table.setAutoResizeMode(table.AUTO_RESIZE_OFF); // Used to set the Auto resize in the off mode..
scrollPane = new JScrollPane(table);
table.setPreferredScrollableViewportSize(new Dimension(50,50));
getContentPane().add(scrollPane);
Regards,
Jagan Mohan Reddy
22 years ago
Hi,
override the method isCellEditable(int row,int column) in ur table class.

The code looks something similar to this.

JTable table = new JTable(5,5) {

public boolean isCellEditable(int row,int column) {
if(row ==2 && and column ==3) // specify this depending upon ur requirement. Here the cell 2,3 is not editable.
return false;
else
return true;
}
};
Hope this works out for you..
Regards,
J M Reddy



23 years ago
Hi,
Add actionListener to the password field and submitbutton.
and that solves ur problem.

passwordField.addActionListener(this);
submitButton.addActionListener(this);
In Listener the code will be something like this.

public void actionPerformed(ActionEvent ae) {
System.out.println("Hello");
}

Regards,
Jagan Mohan Reddy.
23 years ago
Hi,

Thanks for your answer.
Regards,
Jagan Mohan Reddy.
23 years ago
Hi,
Your approach doesnot solve the problem.Add th key listener to the text field.
your keylistener looks something like this.
public void keyPressed(KeyEvent e){

int length = tf.getText().length();
if(length>=10)
tf.setText(tf.getText().substring(0,length-1));

}

Hope this solves ur problem.
Regards,
Jagan Mohan Reddy.
23 years ago
Hi,
I think you are using a scrollpane over the table.
The grey portion is not the table area but the view port area. so set the background for the view port.

the code for getting the background color is
table.setBackground(Color.red);
table.getViewport().setBackground(Color.red);

I think this solves ur problem.

Regards,
Jagan Mohan Reddy.
23 years ago
Hi,
I think this be done only through windows programing which i dont know.The dos prompt that open will help to check ur output messages. If u know how to minimize the dos-prompt pls do mail me. mailid:[email protected]
Regards,
Jagan Mohan Reddy.
23 years ago
Hi,
I think if you try on these lines this might help you.

Think mouselistener event should be something like this.
public void mousePressed(MouseEvent me) {

selectedRow = table.getSelectedRow();


}
public void mouseReleased(MouseEvent me) {
Point point = new Point(me.getX(),me.getY());
int currentRow = table.rowAtPoint(point);

(currentRow!= -1) {
tableModel.moveRow(selectedRow,selectedRow,currentRow);
}

}

If you try on these ground this might help you out.
Regards,
Jagan Mohan Reddy.


23 years ago
Hi,
I think u can also execute it using a batch file.
The Batch File Content Is something like this.
For Suppose ur application jar file is in D:\application.
Let the jar file be application.jar
Let the JFrame class be FrameClass.java
execute.bat
===========

set classpath=%classpath%;D:\application\application.jar
java FrameClass

The execute.bat file should be in the folder D:\application
Hope this solves ur problem.

Regards,
Jagan Mohan Reddy
23 years ago
hi,
Think this code solves ur problem.

JTextField tf = new JTextField(20);

tf.setEditable(false); //Since ur application is a calculator think this statement is also necessary.

tf.setHorizontalAlignment(JTextField.RIGHT);//sets the text to be right aligned.

Regards,
Jagan Mohan Reddy.
23 years ago