aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes mini web browser: browse pages be only b&w not in color Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "mini web browser: browse pages be only b&w not in color" Watch "mini web browser: browse pages be only b&w not in color" New topic
Author

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

Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
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

Joined: May 03, 2008
Posts: 4523
    
    5

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.


luck, db
There are no new questions, but there may be new answers.
Leonidas Savvides
Ranch Hand

Joined: Jan 31, 2010
Posts: 402
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
Rancher

Joined: Sep 21, 2011
Posts: 2408
Not sure what you mean: In order to work on a Swing app, obviously you need to be familiar with Swing.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: mini web browser: browse pages be only b&w not in color
 
Similar Threads
Selecting directory using input=file
How to set up web project in NetBeans (was: How to deploy jsp project)
Running Applet in JFrame
problem without logout, how to solve it
Invoking one overloaded constructor from another with this()