Java Swing GUI to Open File and Display Text

Closed

Description

Require a Java Swing GUI program that opens a file as a binary stream and then displays the values of each byte in Hex and as readable text.

The program should have a reasonable GUI including the title “Binary File Viewer”

The program should display the name of the file being viewed.

The program should use a Swing TextArea to display the file using the specified format below. This should allow the user to scroll back and forth through the entire file.

The program should include a New button that allows the user to enter the name of the file to view. Use the java file picker dialog for this. Be sure to code it so that it will recover from errors and not simply terminate the program.

The program should include a Quit button.

Assume that your program will read the entire file into memory and create the display content within the textArea.

Make sure that the program closes any opened files especially when the user exits the program.

Required Display format:

16 Byte values displayed as 2 digit hex values separated by 2 spaces, then a separator | and then the text representation of these same characters. For the text representation, use a period or dot for non-printing characters (like a carriage return) and just display the printable ones.

Here is an example of what you should display:

AD EF 00 10 46 56 23 50 AD EF 00 10 46 56 23 50 |..aBntefg.?>..

AD EF 00 10 46 56 23 50 AD EF 00 10 46 56 23 50 |..aBntefg.?>..

AD EF 00 10 46 56 23 50 AD EF 00 10 46 56 23 50 |..aBntefg.?>..

AD EF 00 10 46 56 23 50 AD EF 00 10 46 56 23 50 |..aBntefg.?>..

Display at least 16 lines of output, unless the file you are viewing is shorter than that.

To be clear, there are 16 characters to the right of the | separator which correspond directly to the 16 hex byte codes on the left. So, looking at the example above the first byte has the value of AD and the first character to the left of the | separator is the printable character that has that same code or is a period if that value is not printable. (I did not bother to look up the codes for the example so it only shows the format, not the actual text characters for the hex bytes values but your program will.)

Note that the program should be exactly formatted like this. Each Hex byte should be 2 hex digits with two spaces between each byte. Do not put spaces between the text representation characters on the right side of the separator.

Notes:

You will want to use the JFileChooser Swing component to implement the open file dialog for the file viewer. There are some issues when the user enters the forward slash \ as the directory separator because java will interpret it as the escape character. You can fix this by searching though the file string and either replacing the forward slash with a backslash / or inserting an extra forward slash \\.

Insure that each byte has two digits. This means that you may have to append the leading zero for a value like 0A = 10 in dec.

The program has to compile of course and I require the source code. Thank you.

The code should be adequately commented. If you utilize shared code, please reference credit to the author, in the comments.

Skills: Java

See more: java gui open file, open file swing, open file java gui, open file java swing, display file gui java, display text file swing, display file java gui, swing open file, open file using gui java, open file gui java, display text file gui java, java display file, java gui text, java gui file, java swing file viewer, java swing open file, java open file gui, display file using gui java, java swing text file viewer, open text file java swing, java swing display text, read text file gui java, open text file java gui, open java gui, open file display java

Project ID: #652288

Awarded to:

jss2010

Hi, I have 10 years of experience in Java development. Check PM.

$70 USD in 1 day
(3 Reviews)
4.2

24 freelancers are bidding on average $53 for this job

TopOfStack

please check our profile at... http://www.rentacoder.com/RentACoder/DotNet/SoftwareCoders/ShowBioInfo.aspx?lngAuthorId=7097460 thanks

$30 USD in 3 days
(53 Reviews)
5.9
ihsoftAFaisal

Please check PM.

$80 USD in 0 days
(8 Reviews)
5.8
tomky

Hi. It's a nice exception to read clear specifications with examples like yours. Regards.

$40 USD in 2 days
(51 Reviews)
5.3
Nzay

I can to the same in a different coding way! I have uploaded samples of my work. Feel free to ask any questions! Looking forward to work with you.

$50 USD in 1 day
(14 Reviews)
4.6
talluriamara

i can do this.please check your PMB

$50 USD in 0 days
(3 Reviews)
4.0
meborntocode

Hi I have good experience in java, Swing development. i can complete your project in very shot time. Thanks Borntocode

$50 USD in 1 day
(4 Reviews)
3.8
webdesigner95

ready to start this.

$60 USD in 2 days
(7 Reviews)
3.1
vanikannan

Extensive experience in Java

$30 USD in 1 day
(0 Reviews)
0.0
stalker2011

performed quickly and accurately

$50 USD in 3 days
(0 Reviews)
0.0
MARJci

I am easily deliver this. Let me know when to start.

$40 USD in 5 days
(0 Reviews)
0.0
mikejturley

I have basically already built what you are asking for, as a part of a tool I am developing for another project. I can easily adapt the code I've already written to create your project in no time. I am an experienced More

$40 USD in 3 days
(0 Reviews)
0.0
complexSolutions

Hi, Please check the PM

$40 USD in 3 days
(0 Reviews)
0.0
rabbitkiller

10yrs Java experience. This one is easy enough to finished within a day

$30 USD in 1 day
(0 Reviews)
0.0
woonnasha

Hi, I have good experience in Java Swings, I have done Layout designing for a complex GUI application which can run irrespective of the screen resolution, for queries please contact 9032229384

$60 USD in 2 days
(0 Reviews)
0.0
kalerahul86

Excellence is my passion.I am ready to develop this

$35 USD in 3 days
(0 Reviews)
0.0
sanpals

Hi, I am a Sun certified Java Programmer and have 3 yrs of industry experience with extensive work done in Java/J2EE and Swing. I assure you well documented code with inherent mainatainablity

$60 USD in 4 days
(0 Reviews)
0.0
IslamNabil

Hello I am a senior Java developer I can finish this application with high quality

$60 USD in 4 days
(0 Reviews)
0.0
mtaha666

I will deliver it easily , just give me chance

$70 USD in 5 days
(0 Reviews)
0.0
duymap

Ready to do this.

$50 USD in 1 day
(1 Review)
0.0
GeniusCoder001

Hello, I am interested in this project please check your inbox Thanks

$55 USD in 2 days
(0 Reviews)
0.0