Created
January 15, 2014 00:00
-
-
Save resarahadian/8428368 to your computer and use it in GitHub Desktop.
Simple Frame Java Gnome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.gnome.gtk.Gtk; | |
import org.gnome.gtk.Stock; | |
import org.gnome.gtk.ToolButton; | |
import org.gnome.gtk.Toolbar; | |
import org.gnome.gtk.VBox; | |
import org.gnome.gtk.Window; | |
import org.gnome.gtk.WindowPosition; | |
public class frameJavaGnome extends Window { | |
public frameJavaGnome() { | |
setTitle("Simple Frame Java Gnome"); | |
initComponent(); | |
setDefaultSize(800, 600); | |
setPosition(WindowPosition.CENTER); | |
showAll(); | |
} | |
public void initComponent() { | |
Toolbar toolbar = new Toolbar(); | |
ToolButton tabBaru = new ToolButton(Stock.NEW); | |
ToolButton tabBuka = new ToolButton(Stock.OPEN); | |
ToolButton tabSimpan = new ToolButton(Stock.SAVE); | |
toolbar.insert(tabBaru, 0); | |
toolbar.insert(tabBuka, 1); | |
toolbar.insert(tabSimpan, 2); | |
VBox vbox = new VBox(false, 2); | |
vbox.packStart(toolbar, false, false, 0); | |
add(vbox); | |
} | |
public static void main(String[] args) { | |
Gtk.init(args); | |
new frameJavaGnome(); | |
Gtk.main(); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment