Search code examples
javagwtextjsnetbeansgxt

GXT 2.2.5 give ugly page


My project: GWT 2.3.0, GXT 2.2.5 Server: Glassfish 4.1. IDE: NetBeans 8.0.1 with plugin gwt4nb.

I try create simply GXT project but when i run application it give me page with only label and button looks like html. If i want add slider or other component - browser doesnt display this (I think code wasn't compile to html, css etc).

step by step what i done
1.Create new project: web application and technology: gwt
2. Add library to classpath gxt.jar
3. Add resources from gxt.rar to war folder in my project
4. Add <inherits name='com.extjs.gxt.ui.GXT'> to Main.gwt.xml
5. Add <link rel="stylesheet" type="text/css" href="resources/css/gxt-all.css" />to html


Solution

  • I think the problem is your gwt apps can't load the gxt-all.css. This is one of many ways to include the gxt-all.css file :

    1. Create a new folder in you webapp folder (same level with your host.html file) and named it resources
    2. Then inside the resources folder create another folder name css
    3. Copy the gxt-all.css file inside this css folder

    Clean your workspace, and restart you gwt application, and you should be good now. Hope this helps. Thanks