2013. 5. 29.

How to position dialog box on center of window?

final JDialog d = new JDialog();
d.setLocationRelativeTo(null); // <====== USE THIS CODE !!!!

2013. 5. 24.

Removing style from html to simplify HTML code

1)  using regular expression

style=["|'][^('|")]*["|']    # find style attributes.  and replace with space.

2013. 5. 2.

how to assign date to variable on command prompt of MS windows.

I need to make batch file which generates some logs. File names must be based on date_time

1) new file from text editor  (ex: file name is make_log.bat) 
     type below.

 SET DT=%date%     REM we can get current date from %data%
 SET LOG_NAME = %date%_.log   REM  2013-01-01_.log 

2) save
3) click  make_log.bat 

Enhanced by Zemanta