Java open new windows at the second monitor in full screen size without toolbar

GraphicsConfiguration config = this.getGraphicsConfiguration();
GraphicsDevice myScreen = config.getDevice();
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
for (int i = 0; i < gs.length; i++) {
// System.out.println(“id is ” + gs[i].getIDstring() + ” and the current id is ” + myScreen);
// System.out.println(gs[i].getDisplayMode().getWidth() + ” ” + gs[i].getDisplayMode().getHeight());

if (!gs[i].equals(myScreen)) {
// System.out.println(“i = ” + i);
this.setLocation(gs[i].getDefaultConfiguration().getBounds().x, this.getY());
this.setExtendedState(JFrame.MAXIMIZED_BOTH);
this.setUndecorated(true);
}

//System.out.println(java.awt.Toolkit.getDefaultToolkit().getScreenSize());
// to check default resolution of the device
}

RXTX- Serial port java implementation

Installation for Windows

RXTX installation procedure if you want to run RXTX enabled programs ==

If you just want to run RXTX enabled programs, follow this procedure.

Identify your Java Runtime Environment’s folder. For version 1.6.0, this usually is

c:\Program Files\Java\jre1.6.0_01\
  • Copy rxtxParallel.dll to c:\Program Files\Java\jre1.6.0_01\bin\
  • Copy rxtxSerial.dll to c:\Program Files\Java\jre1.6.0_01\bin\
  • Copy RXTXcomm.jar to c:\Program Files\Java\jre1.6.0_01\lib\ext\

NOTE: When installing on Windows XP Embedded, make sure you include crtdll.dll (in the C Runtime Component) as it is required by rxtxSerial.dll

RXTX installation procedure if you want to develop or compile RXTX enabled programs

If you want to develop and compile RXTX enabled programs, for example with the NetBeans IDE, follow this procedure.

Identify your Java Development Kit’s folder. For version 1.6.0, this usually is

c:\Program Files\Java\jdk1.6.0_01\
  • Copy rxtxParallel.dll to c:\Program Files\Java\jdk1.6.0_01\jre\bin\
  • Copy rxtxSerial.dll to c:\Program Files\Java\jdk1.6.0_01\jre\bin\
  • Copy RXTXcomm.jar to c:\Program Files\Java\jdk1.6.0_01\jre\lib\ext\

Note that there is an additional \jre\ subfolder in this path!

Displaying Korean/Chinese/Japanese in Java Swing JLabel properly

When you are working with international language with java GUI or Swing or JSF, you might encounting an issue that characters could broken in many reason.
Then, you ar wondering about the database encoding type and so on. But you can easily troubleshot on this case if there is only one or few areas are broken.

In that case, the database encoding type is normally fine but your swing component(JLabel)’s font property might not be set up properly.

Then, you an can open the font property and select the “Derive the font from the default font“.
Then restart the GUI or application, it should display proper language at this time.

java swing jlabel Korean display issue

How to set up the PATH with Windows10

The Windows 10 hide so many manual stuff that you can’t easily find out.
However, it has been simplify to get the control panel than previous windows version by just typing “Control Panel” at the Cortana command line or say anything with microphone.

After that, it will popup the control panel window. Then, the remain steps are same as conventional way as below;

Control Panel -> System and Security -> System -> Advanced system settings

windows10_path

[Magento 2] Authorized.net completion pending or error issue (Not moving to next page.)

The Magento 2 improves in many ways but it is still lagging with many small issues to use properly.
The major credit card processing that is the Authorized.net direct post way which is processing properly at the backend.
I can see the transaction that is successfully in placed at the authrozed.net and admin console got the order properly.
but the page was not moving at all after the completion of payment from the client side.

The solution should be temporary but it is working fine at this moment.
The Magento version is 2.1.1 and authorized.net direct post.

From /shop/vendor/magento/module-authorizenet/Model/Directpost.php,
You should comment out the $this->checkTransId(); as below sameple;

protected function processOrder(\Magento\Sales\Model\Order $order)
{
try {
$this->checkResponseCode();
//$this->checkTransId();
} catch (\Exception $e) {
//decline the order (in case of wrong response code) but don’t return money to customer.
$message = $e->getMessage();
$this->declineOrder($order, $message, false);
throw $e;
}

Magento: Unknown cipher in list: TLSv1 to install new extensions

 

downloader/lib/Mage/HTTP/Client/Curl.php, try changing:

$this->curlOption(CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

to

$this->curlOption(CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1);




error: Content is protected !!