lalit sahoo

Greenhorn
+ Follow
since Jan 18, 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 lalit sahoo

Hi,

Here is what I did:
1. I downloaded STS 3.1.0
2. I created a Spring MVC application using the template in STS. No new code has been added from my side yet.
3. I did a build of the Spring MVC application within STS and that worked without a problem
4. I deployed the MVC application to the bundled server: “VMWare vFabric tc Server Developer Edition v2.7” and attempted to start it.

But I am getting following error:


I am new to spring. Also I am not able to move forward.

Can anyone please help me in resolving this issue?

Regards,
Lalit
10 years ago

Originally posted by Marc Yuold:
Hi folks,

Have you ever wanted to open up your own software consulting business, but never actually got around to doing it - for whatever reason? Are you a Java/J2EE developer with at least 2 years of commercial experience? Would you work hard to achieve your goals? Do you know a little about marketing?

If can answer YES to all of the above questions, then I'd love to hear from you. I plan on opening up a software consulting business with a partner - aimed at small to medium sized companies. There would be no limits to what we could achieve.

If your interested, email me at coderxster@gmail.com.

Thanks.



Hi Marc,

Thanks for discussing about such opportunity.

I am very much interested in this.

Could you please provide me more details?

Regards,
Lalit
15 years ago
Hi!
All..
I am displaying 2 jlabels,1 jtext field, 1 Jcombo box and 2 jbuttons.
I have added a focus listener to the text field.On focus lost of this text field i am displaying a message .
The problem is..when the text field is loosing focus by clicking on the "ok" button,the message is appearing as usual.But after clicking on the message,the "ok" button is not coming back to original state.what to do so that it will come back to original state.
I am attaching the code below..any help will be appreciated.

import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.event.*;
public class ChartNameFrame21 extends JFrame
{
JLabel jla_compName,jla_compID;
JComboBox jcmb_compName;
JTextField jtf_compID;
JButton jbtn_OK,jbtn_CANCEL;
JPanel jp_compPanel,jp_btnPanel;
String [] str_chart_Names = null;
Random rd_value;
static ChartNameFrame21 cname;
Container contentPane = null;
public ChartNameFrame21()
{
ImageIcon ima = new ImageIcon("middle.gif");
jla_compName = new JLabel("Component");
jla_compName.setPreferredSize(new Dimension(130,30));
jla_compName.setMaximumSize(new Dimension(130,30));

str_chart_Names = new String[]{"AreaChart2D","AreaChart3D","BarChart","BoxPlot",
"GroupedBarChart","LineChart","LineChart3D",
"PercentageAreaChart","PieChart","PieChartExplode",
"StackedBarChart","StockChart","StockChartVol","StockQuotes",
"TimeChart","XYLineChart","XYLineChart3D"};
jcmb_compName = new JComboBox(str_chart_Names);
jcmb_compName.setMaximumRowCount(3);
jcmb_compName.setPreferredSize(new Dimension(130,30));
jcmb_compName.setMaximumSize(new Dimension(130,30));
jcmb_compName.addItemListener(new ComboItemListener());
//first temp panel for label and combo box
JPanel jp_temp = new JPanel();
jp_temp.setLayout(new BoxLayout(jp_temp, BoxLayout.X_AXIS));
jp_temp.add(jla_compName);
jp_temp.add(jcmb_compName);
jbtn_OK = new JButton("OK", new ImageIcon("left.gif"));
jbtn_OK.setPreferredSize(new Dimension(100,50));

jbtn_OK.setPressedIcon(ima);
jbtn_CANCEL = new JButton("CANCEL");
//fourth panel for the above two buttons
jp_btnPanel = new JPanel();
jp_btnPanel.add(jbtn_OK);
jp_btnPanel.add(jbtn_CANCEL);

jla_compID = new JLabel("ID");
jla_compID.setPreferredSize(new Dimension(130,30));
//jla_compID.setMinimumSize(new Dimension(100,30));
jla_compID.setMaximumSize(new Dimension(130,30));

rd_value = new Random();
int i_idValue = Math.abs(rd_value.nextInt());
jtf_compID = new JTextField(5);
jtf_compID.setText("A2D"+(String.valueOf(i_idValue).substring(0,7)));
jtf_compID.setPreferredSize(new Dimension(130,30));
jtf_compID.setMaximumSize(new Dimension(130,30));
jtf_compID.addFocusListener(new TextFocusListener());
//second temp panel for label and text field.
JPanel jp_temp2 = new JPanel();
jp_temp2.setLayout(new BoxLayout(jp_temp2,BoxLayout.X_AXIS));
jp_temp2.add(jla_compID);
jp_temp2.add(jtf_compID);

//third panel for the above two temp panels
jp_compPanel = new JPanel();
jp_compPanel.setLayout(new BoxLayout(jp_compPanel,BoxLayout.Y_AXIS));
jp_compPanel.add(jp_temp);
jp_compPanel.add(Box.createRigidArea(new Dimension(0,20)));
jp_compPanel.add(jp_temp2);
contentPane = getContentPane();
contentPane.setLayout(new BorderLayout());
JPanel topPanel = new JPanel();
topPanel.setLayout(new BoxLayout(topPanel,BoxLayout.Y_AXIS));
topPanel.add(Box.createRigidArea(new Dimension(0,200)));
topPanel.add(jp_compPanel);
topPanel.add(Box.createRigidArea(new Dimension(0,80)));
topPanel.add(jp_btnPanel);
contentPane.add(topPanel);
//setSize(300,300);
//setSize(Toolkit.getDefaultToolkit().getScreenSize().width,Toolkit.getDefaultToolkit().getScreenSize().height);
setVisible(true);
}

class ComboItemListener implements ItemListener
{
public void itemStateChanged(ItemEvent e)
{
if(e.getSource().equals(jcmb_compName))
{
int i_cmbIndex = jcmb_compName.getSelectedIndex();
Object o_txtValue = jcmb_compName.getItemAt(i_cmbIndex);
int j = Math.abs(rd_value.nextInt());
String str = String.valueOf(j).substring(0,7);
if(i_cmbIndex == 2 || i_cmbIndex == 3 || i_cmbIndex == 5 || i_cmbIndex == 7 || i_cmbIndex == 8 || i_cmbIndex == 10 || i_cmbIndex ==11 || i_cmbIndex == 14 || i_cmbIndex == 15)
jtf_compID.setText(String.valueOf(o_txtValue).substring(0,3)+str);
else
{
switch(i_cmbIndex)
{
case 0:
jtf_compID.setText("A2D"+str);
break;
case 1:
jtf_compID.setText("A3D"+str);
break;
case 4:
jtf_compID.setText("GBC"+str);
break;
case 6:
jtf_compID.setText("L3D"+str);
break;
case 9:
jtf_compID.setText("PEX"+str);
break;
case 12:
jtf_compID.setText("SVO"+str);
break;
case 13:
jtf_compID.setText("SQU"+str);
break;
case 16:
jtf_compID.setText("X3D"+str);
break;
}
}
}
}
}
class TextFocusListener implements FocusListener
{
public void focusGained(FocusEvent e)
{
}
public void focusLost(FocusEvent e)
{
System.out.println("lost focus event");
JTextField jt = (JTextField)e.getSource();
if((jt.equals(jtf_compID)) && !(e.isTemporary()))
{
Object o_ChartType = jcmb_compName.getSelectedItem();
String s_ChartID = jtf_compID.getText().trim();
boolean isConnection = false;
if(!isConnection)
{
System.out.println("Not unique id");
//JFrame f = new JFrame();
JOptionPane.showMessageDialog(jtf_compID, "The ComponentID is not UNIQUE");
}
}
}
}

public static void main(String args[])
{
cname = new ChartNameFrame21();
cname.pack();
cname.setSize(Toolkit.getDefaultToolkit().getScreenSize().width,Toolkit.getDefaultToolkit().getScreenSize().height);

}

}
21 years ago
Hi
Sheldon,
Beans r reuseable components whereas classes r not.
22 years ago