R.Joe

Ranch Hand
+ Follow
since Jun 16, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by R.Joe

sorry for wrong posting

after declaring variable y as public static and accessing that variable inside X1 class as per your suggestion "AA.y", it will not works , it gives compilation error "can't access AA class inside X1 class

pl help

regards
16 years ago
Pl help me out to run this program or how to access variable y inside the X1 class of a1 package

default package class
/////////////////////
import a1.*;
class AA
{
public int y=2;
public static void main(String[] args)
{
X1 xi =new X1();
xi.show();
}
}
///////////////////////

package class is

///////////////////////////////////
package a1;
public class X1
{
public int i = 0;
public void show()
{
System.out.println("value is "+i);
System.out.println("value is "+y);
}
}
////////////////////////


regards
16 years ago
How can we read short datatype in java which was write in C?
I am sending two byte(one short) from C and read that two byte(one short) in java, but i am not able to read that byte
HI all,
i have a problem with Java 6.
I used an invisibleMenuItem to enable some shortkey. it works fine with Java 5.
while with Java 6, the following methods wont work anymore

invisibleMenuItem.setAccelerator
16 years ago
Is it posible , we can add the MouseMotionListener to the container and it get automatically added to their components.
17 years ago
I have a JInternalFrame having JButton,JTable and JLabel
I have added the MouseMotionListener to the JInternalFrame
mousemoved event fires on JInternalFrame and JLabel but not in JButton or JTable

Pl help me out
Thanks in advance
17 years ago
while running my application on
java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03)
BEA JRockit(R) (build R27.3.1-1-85830-1.5.0_11-20070716-1248-windows-ia32, compiled mode)

it gives an exception and application terminated.
Exception are

Exception in thread "Thread-20" java.lang.OutOfMemoryError: allocLargeObjectOrAr
ray - Object size: 131088, Num elements: 131072



Exception in thread "RMI TCP Connection(9)-<application ip>" java.lang.OutOfMemoryError: nativeGetNewTLA

Pl help me out,
Thanks in advance
17 years ago
I had added the hot key F5 in the menu item which is invisible it is working fine in jre 1.4, 1.5 but not in 1.6,
Help me out,

JMenuItem item1 = new JMenuItem("Item Listener");
item1.setAccelerator(KeyStroke.getKeyStroke("F5"));
item1.setVisible(false);
item1.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
// action event
}
});

thanks in advance
18 years ago
I am sending the request to the server, till the response comes modal dialog box appears as soon as response comes it update the jtable and close the dialog box

Runnable run = new runnable()
{
public void run()
{
// req send to server and after receiving the response, it update into the table
//modal dialog box dispose
}

};
SwingUtilities.invokeLater(run);
//modal dialog box appears

Pl help me out
18 years ago
How can i add image on the application icon and title bar icon in the J2me Midlet
18 years ago
basically i want to fetch the data from the text field and then mail it
put your textarea in scrollpane and also mention the width and height of a textarea or set the layout of the panel as border which takes into center, panel have a default flowlayout
ex:
body = new JTextArea(20,30);
JScrollPane sp =new JScrollPane(body);
text.add(sp);

i hope it will help it out
18 years ago
by using the AbstractTableModel method isCellEditable(int row, int col)

syntax

public boolean isCellEditable(int row, int col)
{
if (col == 0)
{
return true;
}
else
{
return false;
}
}
18 years ago
How i use mailto command with large amount of body content more than 2020 character

syntax
mailto: ?subject=welcome&body=

please help me out
u should use mouseListener like this

table.addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent e)
{
int X = e.getX();
int Y = e.getY();

int currentCol = getCurrentColumn(X,Y);
int currentRow = getCurrentRow(X,Y);
String str = getTableValueAt(cRow,cCol);
}
}
don't use getselectedrow, first dwtwct column and row then fetch a value when user click any row, i hope now ur problem get sorted off.
20 years ago