Author: totosugito

Android Sent Text To JavaScript

While developing Android application, sometimes we need to use webview and want our android (java code) communicate with html in webview. We can use javascript to communicate between java to html and vice versa. Dont forget to setting javascript enabled in our webview to true. Please check code below to check how Android sent text

Java Prevent BoxLayout From Expanding Children

I have created design GUI using java by programmatically. I want to add some of JPanel to my JFrame (mainwindow). I set JFrame layout using BoxLayout. I am use BoxLayout because want the children resize only width. But, when I resize the mainwindow (JFrame), children width and height is resized. BoxLayout expanding all children width

Matlab MEX create struct data type

I want creating MEX function in C/C++ and return struct data type to Matlab. This code can create struct data type with some of variable have int, double, string and matrix (array) data type. We need to use “mxCreateStructArray” matlab function to create struct data in C/C++ and return that struct data type to Matlab.

Java JFrame change Icon

I have learn about GUI programming using java this week. I have created a simple window (using JFrame) and get the default icon in titlebar is a default java icon. But, I dont like this default icon image and want to change with another image. This is a complete code how to change JFrame icon