med lam

Greenhorn
+ Follow
since Jul 17, 2001
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 med lam

Sorry to disappoint you but i've already did all that stuff.
I've even created my own EditorKit, HTMLDocument, And extended the parser... The problem isn't that simple.
Moreover, you've noticed that when you don't put spaces between & n b s p it does'nt appear on the forum message (as in yours) . My question was actually how to insert content (as spaces) and not how to set a JEditorPane to read and write HTML, caus' this, i know already...

22 years ago

I'm developping an HTML Editor on a JEditor Pane.
The problem is that a blank is not interpreted, and i've tried to add "& n b s p ;" in the code from a KeyListener added to the VK_SPACE event, or to define an Action to add HTML Spaces. But i didn't achieve to...
I just want to insert a "& n b s p ;" in the HTML code of the document displayed in the JEditor evry time the SpaceBar is pressed.
I've tried InsertContentAction() :
Not a solution :It inserts " & n b s p ;" in the text (it appears litteraly).
I've tried InsertHTML. But it needs a tag parameter, and in my case, i need no tag
to be inserted.
I'm stuck since days... Any help woul be extremely appreciated...


22 years ago
I've implemented a gif filenamefilter, but i have problem using it : here's the code:
public class GifFileFilter implements FileFilter {
public boolean accept(File f) {
return (f.getName().toLowerCase().endsWith(".gif") | | f.isDirectory());
}
}
public FileList(String Path) {
super();
File Dir = new File(Path);
String Tab[} = Dir.list(new GifFileFilter ());
}
I have a compilation error that says: "The list method called for type java.io.File with arguments (GifFileFilter) is not defined"
Should I extend the File type and define a new constructor or what?
22 years ago