How to remove the border of a JFrame

Assuming that you ‘re developing an application, in which the default look-and-feel doesn’t match, at all.

To be more specific, imagine the following example: I sometime wanted to develop a real-time clock JAVA application. It would be a bit ugly for the application’s purpose to have the annoying border around its JFrame.

Indeed, there is a way to implement this: you just need to set the frame’s undecorated method to true:   frame.setUndecorated(true);

Keep in mind that the above code has to be placed before frame’s setVisible() method. Otherwise, it’s like initializing the frame and then telling it to be undecorated, sth that doesn’t make sense. So, you first customise the frame as you wish (undecorization, etc) and then you enable its visibility.

The full application that supports this post is related here.


How to solve LF would be replaced by CRLF

It’s nearly to seven in the morning (new english expressions) and before going to bed, I would like to share this experience, as the most stuff that I found over the net wasn’t very impressive to my tired eyes.

I today started dealing with github and git, although there have been months since I first created an account. 
So, sometime, while trying to upload some files to a public repository of mine, I got the quoted message, displayed in the title.
I tried to find a quick solution to stackoverflow, refering to the first hits of google, here and here, but while being in a rush, my eyes caught words like unix, etc., so I tried to found out by myself what was going on, because the exact error message, did also included the filename that was causing the error.
EDIT: Before continuing reading this, be sure that you tried the following command in the git shell:

git config core.autocrlf false
Opening the file was like a dream:

  1. What I quickly understood in the fore-mentioned links, was what I exactly seeing in my file.
  2. The little knowledge that I accomplished to acquire through this quick reading, made a light flash in my mind.
The exact image was sth like this : 
So, I just had to hit my Backspace button
and everything got as default; successful push
to github accomplished!
If the above wasn’t enough and you countinue getting errors, try to open the specified file with Notepad++, go to Edit => EOL Converion => Windows Format.

Dunno if this really helped you or it made your situation more difficult, but I thought about sharing it, ’cause newbies like me in github may find it useful.