You can use Thex by adding org.brains2b.thex.HexEditor
as a normal Swing component to your application.
The size reserved for this component determines the columns that the HexEditor can display.
Default the ascii representation is also displayed bu can be turned of by hexEditor.setAsciiVisible(false)
Default the HexEditor is created with an empty document. To load a stream or file into the Editor use hexEditor.getIOKit().read(InputStream)
or hexEditor.getIOKit().open(File, BinaryDocument)
look at the javadoc for more possibilities