Search Results

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

Page 1/1 | 1 

  • Java char literal to C# char literal

    - by Kristoffersen
    Hi. I am maintaining some Java code that I am currently converting to C#. The Java code is doing this: sendString(somedata + '\000'); And in C# I am trying to do the same: sendString(somedata + '\000'); But on the '\000' VS2010 tells me that "Too many characters in character literal". How can I use '\000' in C#? I have tried to find out what the character is, but it seems to be " " or some kind of newline-character. Do you know anything about the issue? Thanks!

    Read the article

  • Applet panels, one fixed size, and dynamic JTextField

    - by Kristoffersen
    Hi, I need an applet which contains one panel. The panel needs to be 550x400 pixels, the JTextField needs to be under the panel dynamic size. I want it to be like this: [topPanel] [textPanel] However I am trying this, and it seems like the panel is filling all the space. The code: import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import javax.swing.JApplet; import javax.swing.JPanel; import javax.swing.JTextField; public class Client extends JApplet { @Override public void init() { try { java.awt.EventQueue.invokeAndWait(new Runnable() { public void run() { initComponents(); } }); } catch (Exception ex) { ex.printStackTrace(); } } private void initComponents() { JPanel topPanel = new javax.swing.JPanel(); topPanel.setBackground(Color.red); topPanel.setSize(550, 400); topPanel.setPreferredSize(new Dimension(550, 400)); topPanel.setMinimumSize(new Dimension(550, 400)); topPanel.setMaximumSize(new Dimension(550, 400)); JTextField myTextBox = new JTextField(255); getContentPane().add(topPanel, java.awt.BorderLayout.NORTH); getContentPane().add(myTextBox, java.awt.BorderLayout.SOUTH); } // TODO overwrite start(), stop() and destroy() methods } Thanks!

    Read the article

  • Applet networking patterns

    - by Kristoffersen
    Hi SO. I have an applet that connects to a server, it receives some commands and based on that it haves to draw (or move) different things. Which patterns should I use? I assume that the network connection and applet should run in two different threads? Thanks, Kristoffer

    Read the article

1