Search Results

Search found 3 results on 1 pages for 'tumba25'.

Page 1/1 | 1 

  • Declare two classes from eachother.

    - by tumba25
    I'm writing a app in NetBeans. I have two classes MyApp_View and MyApp_Functions. The MyApp_View class starts like this public class MyApp_View extends FrameView { MyApp_Functions My_functions = new MyApp_Functions(); public MyApp_View(SingleFrameApplication app) { super(app); In MyApp_Functions I have MyApp_View my_view = new MyApp_View(null); I want to access the public variables in MyApp_View from MyApp_Functions and the public methods in functions from view, but have no success with this. Is this doable? And how?

    Read the article

  • Add xml-stylesheet and get standalone = yes.

    - by tumba25
    The code at the bottom is what I have. I removed the creation of all tags. At the top in the xml file I get.<?xml version="1.0" encoding="UTF-8" standalone="no"?> Note that standalone is no, even thou I have it set to yes. The first question: How do I get standalone = yes? I would like to add <?xml-stylesheet type="text/xsl" href="my.stylesheet.xsl"?> at line two in the xml file. Second question: How do I do that? Some useful links? Anything? DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dbfac.newDocumentBuilder(); Document doc = docBuilder.newDocument(); <cut> TransformerFactory transfac = TransformerFactory.newInstance(); transfac.setAttribute("indent-number", new Integer(2)); Transformer trans = transfac.newTransformer(); trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); trans.setOutputProperty(OutputKeys.STANDALONE, "yes"); trans.setOutputProperty(OutputKeys.INDENT, "yes"); trans.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS, "name"); FileOutputStream fout = new FileOutputStream(filepath); BufferedOutputStream bout= new BufferedOutputStream(fout); trans.transform(new DOMSource(doc), new StreamResult(new OutputStreamWriter(bout, "utf-8")));

    Read the article

1