This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Javabean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Javabean" Watch "Javabean" New topic
Author

Javabean

Prabha Balu
Greenhorn

Joined: Nov 24, 2004
Posts: 2
Hai,
I have a queries regarding the JavaBeans. I have created the one file named as intTextBox.java, compiled creating the class files.
When i was trying to create a jar file like this("jar cfm intTextBox.jar intTextBox.mft,intTextBox.class"), its created. But when i am trying to load in the bean container its giving errors like this "jar file c:\intTextBox.jar didn't have any beans" is the main error.

please try to give me the remedy.
Bye
Prabha
louise rochford
Ranch Hand

Joined: Apr 04, 2002
Posts: 119
Hi Prabha,
Could you post your intTextBox.java code?
Maybe it doesn't conform to the bean spec?

Regards,
Louise
Prabha Balu
Greenhorn

Joined: Nov 24, 2004
Posts: 2
Hai,
Here the i am forwarding my bean program and mft programs.
//"intTextBox.java"
import java.awt.*;
import java.awt.event.*;
import java.beans.*;

public class intTextBox extends TextField implements KeyListener
{
public intTextBox()
{
super(15);
this.addKeyListener(this);
}

public void keyPressed(KeyEvent k)
{
int a=k.getKeyCode();
if(((a>=48)&&(a<=57))||(a==8)||(a==37)||(a==39)||(a==35)||(a==16)||(a==20)||(a==127)||(a==36)||(a==144))
k.setKeyCode(a);
else
{
this.setText(this.getText());
k.setKeyCode(8);
Toolkit.getDefaultToolkit().beep();
}
}
public void keyTyped(KeyEvent k){ }
public void keyReleased(KeyEvent k) { }
}


//"intTextBox.mft"

Manifest-Version: 1.0
Name: intTextBox.class
Java-Bean: True


Bye
Prabha
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javabean
 
Similar Threads
Java and activeX ?
name of a jar
loading properties file for a component.
Class Loader
Jar - Manifest.mf - Class-Path Attribute