reehan ishaque

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

Recent posts by reehan ishaque

Thanks for ur reply Peter.
Is there any way i could prevent myself from putting .class file on remote machine's class path manually. any way to include .class file automatically and dynamically from the network.
thanx
im serializing an object through socket over LAN. On receicing end when i receive the serialized object an error message is raised "can not resolve symbol" i.e java compiler couldn't find that object's class. Is it necessary to put that class file on remote machine even in case of serialization??? i will appreciate if u reply as soon as possible.
thanks
hi folks!
im a running a GUI based java program on windows. when user closes the main window of my application i don want my application to quit rather i want java icon to appear in the system tray beside system time. can u please tell me how to do this?
thanks
22 years ago
hi folks!
check out the following code...

import java.io.*;
class test1
{
public static void main(String a[])throws Exception
{
BufferedWriter bf = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("c:\\java\\test.txt",true)));
bf.write("r"+'\n'+"r"+'\n'+"r"+'\n'+"r"+'\n'+"r"+'\n'+"r");
bf.flush();
}
}
im creating this file on my disk and writing some text into it. when i opened the file test.txt, there were 6 rs written in it separated by a black dot(representing next line character). i want to have each r printed on new line rather than on 1 line separated by that dot. can u tell me how to do it???. thanx
22 years ago
hi folks!
i want to use swing components in applets for that i have to install n import plugin in my applet. i have read quite a few books but i couldn really find help on plugin i.e how to install n import. can u please suggest me any book or online resource which can help me. thanks
22 years ago
hi folks,
i have little confusion abt session management. how can i distinguish between clients using servlet API for session management when there is no user name password facility no the site.
here is the code that we normally write in service method..
HttpSession s = request.getSession(true);
s.putValue("key", "value");
now here i will provide a key to store this particular value. this key is same for all clients as this code is executed each time doGet or doPost method is executed. how will i extract particluar client's info using the key n getValue() method as the key is same for all the clients. please reply me abt it. thanks.
22 years ago
Thanks for ur reply guys.
im looking to have a book on uml with implementation in JAVA ofcourse.
Can i see online contents of the book u told Kyle?? thanks
hi folks!
please tell me abt any good book on uml. i have studied a few but all those restrict them to only design strategies. i want to learn abt both design n implementation like how to implement USE CASES, AGGREGATION, ASSOCIATION, COMPOSTION and so on. thanks
but isnt there any alternative tachnique like in VB using begin n end block for transactions???
22 years ago
hi folks!
wat if a jsp page is being executed on server side. Only 5 instructions r executed out of 10 n user clicks the back button of the browser. now the last 5 instructions r left but u wanted to execute all the 10 instructions. how to handle this?
how to do it in a single transaction?? thanks
22 years ago
im still waiting for ur replies . please tell me abt it.
22 years ago
thanks Michael but u didn tell me abt 2nd question why selected is printed twice???
thanks to you.
22 years ago
hi folks!
i have these 2 problems in JTable.
1)
how to set editing of cells disabled, by default it is enabled but i want to disable it.i didn find any method. i have used cancelCellEditing() of DefaultCellEditor and stopCellEditing() but it didn work.

2)
when i select any row or cell, listSelectionEvent
is fired. but in this code it is being fired twice . selected is printed twice. please tell me abt it why it is doin so.
check the code.
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.table.*;
import javax.swing.event.*;
public class TableTest extends JFrame implements ListSelectionListener
{
String data[][] = {

{"1","first1", "last1"},
{"2","first2", "last2"},
{"3","first3","last3"}
};

String columns[] = {"#","first name","last name"};
JTable t;
DefaultTableModel dt;

ListSelectionModel l;

TableTest()
{


dt = new DefaultTableModel(data,columns);
t = new JTable(dt);


l = t.getSelectionModel();
l.addListSelectionListener(this);

JScrollPane pane = new JScrollPane(t);
Container c = getContentPane();
c.add(pane,BorderLayout.CENTER);

setVisible(true);
setSize(200,200);
}

public void valueChanged(ListSelectionEvent e)
{
System.out.println("selected");
}
public static void main(String args[])
{
new TableTest();
}

}
22 years ago
hi!
check this code
import java.applet.*;
import java.awt.*;
import java.net.*;
public class applet extends Applet
{
Image i;
URL u = null;
public void init()
{
try
{
u = new URL("http://localhost:8080/examples/jsp/");
}
catch(Exception e){}
i = getImage(u,"image.gif");
}
public void paint(Graphics g)
{
if(i!=null)
g.drawImage(i,0,0,this);
}
}
an SecurityException is thrown
can i download an image using Applet's getImage() method from anywhere on the net or i can only download it from the codeBase???
22 years ago
hi folks!
im appending some text to TextArea but i also want to append some image along with text. how can i do it using awt components, not swings. i think TextArea probably wont supportthis . swing components like JTextPane n JEditorPane might support this. but i want to use awt components. so any idea how to do this???
thanx
22 years ago