M. Imran

Greenhorn
+ Follow
since Feb 12, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by M. Imran

Yes still there is no updation in profile. May be SCBCD 5.0 is not present in the certification list.

Imran
Dear All,
I write the SCBCD 5.0 on Friday, it was my first experience to take a beta exam although passed 5 other SUN certifications before. I passed SCBCD 3.0 three months back, which help me a lot. Exam was not difficult but very lengthy. Around 10-15 questions comprises full A-4 size sheet, which in my view a trap to waste time (and I trapped). Personally, I feel that I did well beside not able to go through all questions second time due to time shortage.

1.MDBs, Exception, Transaction, Security can be prepared from Head First but must read specification as well. The current specification looks me very user friendly, take a closer look on examples given in specifications

2.Try to prepare persistence API form O�Reilly book

3.Their were some questions in which they check knowledge of passed by value and passed by reference in session bean remote vs. local interface

4.More code based question than before just to check our hands on ability

5.Use and propagation of Transaction within JAVA Persistence API (JPA)

6.The good part of exam was that the questions come in sequence and in bunch e.g. start from annotations, session bean, transaction etc. if you weak in some area you can easily skip that section.

Hope this helps.

Regards,
Imran
I second you, upgrade exam is available for SCWCD 1.4 and cost you just $100. Their must be upgrade for SCBCD with same conditions as in the case of SCWCD.

Thanks,
Imran
I second you, upgrade exam is available for SCWCD 1.4 and cost just $100. Their must be upgrade for SCBCD.

Thanks,
Imran
Dear All,
I am planning to take EJB 3.0 (BETA) exam, I have reasonable experience of using EJB 2.0 with XDOCLET also passed SCBCD+SCWCD certification. Is there is match between xdoclet+EJB 2.0 and EJB 3.0 which can help me to pass the exam.

Is difference between EJB 3.0 with 2.0 is only that 3.0t support declarative syntax or more than that.

Regards,
Imran
The three steps will run in MDBs except sending exception to the user while a system exception generates. Those steps as mentioned above are :

� Log this as an application error to alert the system administrator.
� Roll back the started transaction.
� Discard the instance of the session bean.
Only container can throw NoSuchEntityException but client will not able to see it ever.

Calling remove() on a bean already removed is just any other method called on bean e.g. create, getHome etc. and all get RemoteException for remote client and EJBException for local clients.

Imran
Can you tell me what is cost of voucher in India?
As SUN increase the price for all their certification ($200) from 1st July with an promotional scheme of free retake if someone god forbidden failed. A sigh of relaxation for the people who are scare off dollars.

Thank you,
Imran
I have passed SCWCD on Friday, score 79%. Get my book from India through DHL just two weeks before my exam.

Thanks for all ranchers for a huge help to pass the exam, which is not tough but very length. My advice for you all that you must read specification atleast related to exam objectives. Idea to take final mock just last day is also not very good, it create huge pressure if you could not able to get good score.

I searched HFSJ about all over Pakistan, its looks discriminatory that O'Reilly all books are not available here. Any one wants this book in Islamabad can contact me m_imran77@hotamil.com off course not free .



Regards,
Imran
Your SCJP certification will veriefy from promatric. You need only two ids for exam. Best of luck .

Imran
Thank you ver much for your kind help. Actually, not only me most of us are very found of constructing new objects.
Can you tell us more about this!
20 years ago
Thanks God, Problem have been solved by Nathan Pruett. Peoples can get the code under thread name "JPopup and JTree Problem ".
Thanks Mr. Nathan again.
Imran
20 years ago
I have popmenu and jtree, popmenu, add a jtreenode in JTree but tree node not appear on screen. All mehtods and interfaces are working correct. Even childcount() method also return that child were add but does not appear.
Can any one have some Idea. I hope Chantal will do consider this problem-
Imran
20 years ago
Dear All,
I am here with a very irritating problem. I have constructed an application with popup menu and a tree. Purpose of this application is to add a JTreeNode with the help of Popup menu.
Its all methods and listeners are working fine but they are unable to add a new tree node. This will be a great help on my part as well for others like me to sort this problem. Code is under:
Thank you,
Imran

import javax.swing.tree.*;
import java.io.IOException;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

class MainFrame extends JFrame{
Container contentPane ;
MainFrame mm;
TreePro treePro;
JTree tree;
popup tpopup;
MainFrame(){
contentPane =getContentPane();
contentPane.setLayout(new BorderLayout());
treePro=new TreePro();
tree=treePro.getJTree();
tpopup=new popup(tree);
//JTree jTree=new JTree();
tpopup.showPopup();
JPanel treePanel=new JPanel();
treePanel.setLayout(new BorderLayout());
treePanel.add(new JScrollPane(tree));
treePanel.repaint();
treePanel.setPreferredSize(new Dimension(200, 100));
contentPane.add(treePanel, BorderLayout.WEST);
setSize(800,800);
show();
}
public static void main (String args[]){
MainFrame mm= new MainFrame();
}
}

///////////////////////////////////////////////////////////////////////////
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.event.TreeSelectionListener;
import javax.swing.event.TreeSelectionEvent;
import javax.swing.tree.TreeSelectionModel;
import javax.swing.tree.*;
import javax.swing.event.*;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class TreePro {
JTree jtree;
DefaultMutableTreeNode p1, p2, p3,rootNode;
DefaultTreeModel treeModel;
popup tpopup;
JTree tree;
JPanel treePanel;
public TreePro() {
rootNode = new DefaultMutableTreeNode("Main");
treeModel=new DefaultTreeModel(rootNode);
treeModel.addTreeModelListener(new MyTreeModelListener());
p1=new DefaultMutableTreeNode("P1");
p2=new DefaultMutableTreeNode("P2");
p3=new DefaultMutableTreeNode("P3");
rootNode.add(p1);
rootNode.add(p2);
tree= new JTree(treeModel);
tree.setEditable(true);
tree.getSelectionModel().setSelectionMode
(TreeSelectionModel.SINGLE_TREE_SELECTION);
}
JTree getJTree(){
return tree;
}
public DefaultMutableTreeNode addObject(Object child) {
DefaultMutableTreeNode parentNode = null;
TreePath parentPath = tree.getSelectionPath();
System.out.println("The from user object 1");
if (parentPath == null) {
parentNode = rootNode;
} else {
parentNode = (DefaultMutableTreeNode)
(parentPath.getLastPathComponent());
}
return addObject(parentNode, child, true);
}
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
Object child) {
return addObject(parent, child, false);
}
public DefaultMutableTreeNode addObject(DefaultMutableTreeNode parent,
Object child,
boolean shouldBeVisible) {
DefaultMutableTreeNode childNode =
new DefaultMutableTreeNode(child);
if (parent == null) {
parent = rootNode;
}
treeModel.insertNodeInto(childNode, parent,
parent.getChildCount());
// Make sure the user can see the lovely new node.
if (shouldBeVisible) {
tree.scrollPathToVisible(new TreePath(childNode.getPath()));
}
return childNode;
}

class MyTreeModelListener implements TreeModelListener {
public void treeNodesChanged(TreeModelEvent e) {
DefaultMutableTreeNode node;
node = (DefaultMutableTreeNode)
(e.getTreePath().getLastPathComponent());
try {
int index = e.getChildIndices()[0];
node = (DefaultMutableTreeNode)
(node.getChildAt(index));
} catch (NullPointerException exc) {
System.out.println("Some thing happen bad");
}
System.out.println("The user has finished editing the node.");
System.out.println("New value: " + node.getUserObject());
}
public void treeNodesInserted(TreeModelEvent e) {
System.out.println("treeNode Inserted");
}
public void treeNodesRemoved(TreeModelEvent e) {
}
public void treeStructureChanged(TreeModelEvent e) {
}
}
}//class TreePro
/////////////////////////////////////////////////////////////
//class which Make popup Menu
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.*;
public class popup{
JRadioButtonMenuItem item1, item2, item3;
JPopupMenu popupMenu;
JTree jtree;
DefaultMutableTreeNode muTableNode;
MainFrame mainFrame;
TreePro treePro;
public popup(JTree jtreee) {
jtree=jtreee;
popupMenu=new JPopupMenu();
treePro=new TreePro();
item1= new JRadioButtonMenuItem("Add");
item2= new JRadioButtonMenuItem("Remove");
item3= new JRadioButtonMenuItem("Properties");
ItemHandler handler=new ItemHandler();
item1.addActionListener(handler);
popupMenu.add(item1);
popupMenu.add(item2);
popupMenu.add(item3);
}
public JPopupMenu showPopup(){
jtree.addMouseListener(
new MouseAdapter(){
public void mousePressed(MouseEvent e){
checkForTriggerEvent(e);
}
public void mouseReleased (MouseEvent e){
checkForTriggerEvent(e);
}
private void checkForTriggerEvent (MouseEvent e){
if (e.isPopupTrigger())
popupMenu.show(e.getComponent(), e.getX(), e.getY());
}
}//end of MouseAdapter
);
return popupMenu;
}
class ItemHandler implements ActionListener {
public void actionPerformed (ActionEvent e){
treePro.addObject("q");
System.out.println("From Item Handler");
}
}
}
20 years ago