Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mini web browser: browse pages be only b&w not in color

 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know to program a Swing mini web browser in java, well is any way its content browse pages be only b&w NOT in color?
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're only concerned with displaying non-interactive content, paint your browser JComponent to a BufferedImage of TYPE_***_GRAY. Display the image in the UI instead of the browser component.

Note that the (invisible) browser component may need to have a size set explicitly.
 
Leonidas Savvides
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not get you well I want just bw screen[webpage] not color, interactive content may run or not...well that you say I must be SCJD TO IMPLEMENT IT (OR SO AS OF KNOWLEDGE)?
 
Tim Moores
Bartender
Posts: 2733
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure what you mean: In order to work on a Swing app, obviously you need to be familiar with Swing.
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another approach might be to use a JavaFX WebView and apply a ColorAdjust with its saturation set to 0.0. If the UI absolutely must be Swing, the WebView could be housed in a JFXPanel.

More can be found on http://docs.oracle.com/javafx/index.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic