Any Java experts out there know how to make a Java editor look like IE does?
For example, I stick the exact same piece of HTML into a Java Editor and get this:
And when it's displayed in IE it looks like this:
Safari looks like this: Not as nice IMHO but at least it supports all the styles.
I much prefer the IE display and can't figure out why the Java one doesn't seem to understand the style sheet properly.
Can anyone help?
Incidentally the Java fframe is taken straight out of a MapTool frame, but I get the exact same effect in my own Java program.
Blakey
HTML Display
Moderators: dorpond, trevor, Azhrei
HTML Display
The guy in the green hat.
Re: HTML Display
from what i understand JFrames only support a subset of html and css.
http://www.lmwcs.com/rptools/wiki/Supported_CSS_Styles
is a list of supported css styles. are you trying yo use any others? From a quick google, it looks like the only way to get full support is either to bundle a simple browser, or save your html to a file and call the user's default browser, both of which are pretty heavy handed.
Hope that helps!
http://www.lmwcs.com/rptools/wiki/Supported_CSS_Styles
is a list of supported css styles. are you trying yo use any others? From a quick google, it looks like the only way to get full support is either to bundle a simple browser, or save your html to a file and call the user's default browser, both of which are pretty heavy handed.
Hope that helps!
- jfrazierjr
- Deity
- Posts: 5176
- Joined: Tue Sep 11, 2007 7:31 pm
Re: HTML Display
What he said... Java's html/css support is about 8-10 years out of date. Your only option would be to fake it by building html tables, parsing the data out for rewrite, and using other hacky type tricks to get alignment the way you want it.bstrdsmkr wrote:from what i understand JFrames only support a subset of html and css.
http://www.lmwcs.com/rptools/wiki/Supported_CSS_Styles
is a list of supported css styles. are you trying yo use any others? From a quick google, it looks like the only way to get full support is either to bundle a simple browser, or save your html to a file and call the user's default browser, both of which are pretty heavy handed.
Hope that helps!
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Re: HTML Display
Cheers guys. I ended up hacking my program - I looked up the CSS sheets wizards are using to generate their monsters and then did search/replace on my HTML classes to add "style=" sections to each class to force the CSS onto the tags. This is what my program frame looks like now:
I'm pretty happy with that. Clear, readable and looks better than the default Java.
Cheers!
Blakey
I'm pretty happy with that. Clear, readable and looks better than the default Java.
Cheers!
Blakey
The guy in the green hat.
- jfrazierjr
- Deity
- Posts: 5176
- Joined: Tue Sep 11, 2007 7:31 pm
Re: HTML Display
If you want the level/role/XP part formatted the same, you would need to break up the bits and put into a table on the top line. Alternately, you "might" be able to use two span tags inside a div, one aligned left and the other aligned right. I would have to see the html you get back to be able to see how easy it would be to reformat...Blakey wrote:Cheers guys. I ended up hacking my program - I looked up the CSS sheets wizards are using to generate their monsters and then did search/replace on my HTML classes to add "style=" sections to each class to force the CSS onto the tags. This is what my program frame looks like now:
I'm pretty happy with that. Clear, readable and looks better than the default Java.
Cheers!
Blakey
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..
Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..