在java中,g.drawString在使用Container时不会在applet中打印

时间:2018-06-15 04:49:50

标签: java database applet containers japplet

我正在使用容器来显示按钮和组合框。稍后显示来自数据库的内容我正在使用g.drawString,但它不会在applet中显示任何内容。这是我的代码

[FunctionName("MyProcess")]
public static void Run(BrokeredMessage currentMessage,[ServiceBus("mytopic",
    Connection = "ConnServiceBus")]ICollector<BrokeredMessage> mytopicDemo, TraceWriter log)
{
    string messageBody = currentMessage.GetBody<string>();
    BrokeredMessage brokeredMessage = new BrokeredMessage(result);
    //extracted Id and Name from body using some code for simplicity making it as messageBody.Id and messageBody.Name
    brokeredMessage.Properties.Add("Id", messageBody.Id);    
    brokeredMessage.Properties.Add("Name", messageBody.Name);
    brokeredMessage.MessageId = "ZZ"; // I also tried GUID here messageBody.Id
    mytopicDemo.Add(brokeredMessage);

    ...                     

我应该使用g.drawstring还是使用jtextfield,以及如何将该文本字段添加到applet。编译时我没有收到任何错误。

0 个答案:

没有答案