https://github.com/totalcross/totalcross
TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
https://github.com/totalcross/totalcross
c embedded-systems gui iot java java-api java-graphics java-gui-application linux-arm totalcross
Last synced: about 1 hour ago
JSON representation
TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
- Host: GitHub
- URL: https://github.com/totalcross/totalcross
- Owner: TotalCross
- License: lgpl-2.1
- Created: 2020-03-13T18:41:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2026-06-25T18:49:06.000Z (6 days ago)
- Last Synced: 2026-06-25T19:14:11.039Z (6 days ago)
- Topics: c, embedded-systems, gui, iot, java, java-api, java-graphics, java-gui-application, linux-arm, totalcross
- Language: Java
- Homepage: https://www.totalcross.com
- Size: 219 MB
- Stars: 224
- Watchers: 16
- Forks: 42
- Open Issues: 109
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
TotalCross
The fastest way to build GUI for embedded devices
[](https://app.fossa.com/projects/git%2Bgithub.com%2FTotalCross%2Ftotalcross?ref=badge_shield)

## Install
TotalCross exists to make Graphical User Interface creation easy.
To start you only need to install it on your machine, and you have two options:
### Install TotalCross VSCode plugin
The quickest way to start using TotalCross is to download the [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=totalcross.vscode-totalcross). We highly recommend this route as it is a smoother process.
Make sure all dependencies are fulfilled ([Java JDK 11+](https://www.azul.com/downloads/zulu-community/?version=java-11-lts&architecture=x86-64-bit&package=jdk), [Maven 3.6.2+](https://maven.apache.org/download.cgi), and
[Microsoft Java Extension Plugin](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack)), create a new project, and you are ready to go!
### ... or run TotalCross from scratch yourself!
If you prefer to run TotalCross yourself so you can develop on your choice of IDE, clone our [HelloWorld](https://github.com/TotalCross/HelloWorld) repository, make sure you have all dependencies listed above in place, run `mvn package` and you are ready to go!
## Usage
This is how you create a button with TotalCross:
```java
package com.totalcross;
import totalcross.ui.gfx.Color;
import totalcross.sys.Settings;
import totalcross.ui.Button;
import totalcross.ui.MainWindow;
public class HelloWorld extends MainWindow {
private Button btnRed;
public HelloWorld(){
setUIStyle(Settings.MATERIAL_UI);
}
@Override
public void initUI(){
btnRed = new Button("Red");
btnRed.setBackForeColors(Color.RED, Color.WHITE);
add(btnRed, CENTER,CENTER );
}
}
```
This is how you extend a button to full screen width:
```java
public void initUI() {
btnRed = new Button("Red");
btnRed.setBackForeColors(Color.RED, Color.WHITE);
add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
}
```
This is how you round borders on a button:
```java
public void initUI() {
btnRed = new Button("Red", Button.BORDER_ROUND);
btnRed.setBackForeColors(Color.RED, Color.WHITE);
add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
}
```
This is how event handling happens:
```java
public void initUI() {
btnRed = new Button("Red", Button.BORDER_ROUND);
btnRed.setBackForeColors(Color.RED, Color.WHITE);
btnRed.addPressListener((event) -> {
// DO SOMETHING
});
add(btnRed, CENTER, CENTER, PARENTSIZE, PREFERRED);
}
```
Cool, right? Easy as pie! :)
## What next?
Check out our [documentation](https://learn.totalcross.com/documentation/components) or read through a [quick starting guide](https://learn.totalcross.com/documentation/get-started) (aprox. 8 minutes) and learn how TotalCross Components will save you tons of time when you build your GUI.
## Have any questions?
Join our [Telegram group](https://t.me/totalcrosscommunity). We are super quick to welcome and provide help to new users :sweat_smile:.
There's also a handy [FAQ.md](./FAQ.md) file with all sorts of useful information, as what is inside this repo, how TotalCross works, how to become a contributor, and more.
## Our contributors
We'd like to give a BIG shout-out to our three first external contributors! These people have helped make TotalCross better by enriching ongoing discussions, reporting bugs, opening issues, and publishing relevant content (videos, articles and etc):
- [@otavio](https://github.com/otavio)
- [@jeffque](https://github.com/jeffque)
- [@microhobby](https://github.com/microhobby)
Guys, you rock!
## RoadMap
Find out what TotalCross world domination plans are by clicking [here](https://learn.totalcross.com/roadmap).
### Where you can find us:
- [Docs](learn.totalcross.com);
- [Issues](gitlab.com/totalcross/totalcross/issues);
- [Telegram](https://t.me/totalcrosscommunity);
- [Medium](https://medium.com/totalcross-community/about);
- [Youtube](https://www.youtube.com/channel/UCSXUBRBC4Ec3_o9R7-3XX-w);
- [Twitter](https://twitter.com/TotalCross);
- [Instagram](https://www.instagram.com/totalcross/).
